Skip to content

Instantly share code, notes, and snippets.

View Salakar's full-sized avatar
🎯
Darting around the place 24/7

Mike Diarmid Salakar

🎯
Darting around the place 24/7
View GitHub Profile
@Salakar
Salakar / PushNotificationiOS.md
Last active May 10, 2019 01:23 — forked from indexzero/PushNotificationiOS.md
Draft proposal for Push Notifications and PushNotificationiOS

Proposal for Push Notifications and PushNotificationiOS

@salakar, @ashoat, @indexzero, @swaagie, @3rdeden, and @msluther met today to discuss this. This is the draft proposal written up during that meeting. We plan to iterate on this over the next week and then post it into a new proposal in react-native-community.

Prior art

  • Push Notification packages
    • react-native-push-notification
    • react-native-notifications
  • Fork of iOS work used in react-native-fire
@Salakar
Salakar / PushNotificationiOS.md
Created May 10, 2019 01:20 — forked from indexzero/PushNotificationiOS.md
Draft proposal for Push Notifications and PushNotificationiOS

Proposal for Push Notifications and PushNotificationiOS

@salakar, @ashoat, @indexzero, @swaagie, @3rdeden, and @msluther met today to discuss this. This is the draft proposal written up during that meeting. We plan to iterate on this over the next week and then post it into a new proposal in react-native-community.

A recording of that meeting can be found below in MP4 format.

Prior art

  • Push Notification packages
  • react-native-push-notification
@Salakar
Salakar / proxy-async.js
Created November 18, 2018 14:50 — forked from KiaraGrouwstra/proxy-async.js
using ES6 Proxy to let Promises/Observables pretend like they're regular values
// using ES6 Proxy to let Promises/Observables pretend like they're regular values.
// get the mapping function used for async objects
let getMapper = (target) => target instanceof Promise ? 'then' :
target instanceof Observable ? 'switchMap' : null;
// ^ fails if the Observable is in a local namespace e.g. Rx.Observable
// bind a value to its object if it's a function
let bindFn = (val, obj) => typeof val == 'function' ? val.bind(obj) : val;
@Salakar
Salakar / process1.js
Created November 16, 2018 11:15 — forked from ndelangen/process1.js
If you have 2 independent NodeJS processes running and want them to communicate, this can be done reliably using a npm package: node-ipc
const ipc = require('node-ipc');
ipc.config.id = 'a-unique-process-name1';
ipc.config.retry = 1500;
ipc.config.silent = true;
ipc.serve(() => ipc.server.on('a-unique-message-name', message => {
console.log(message);
}));
ipc.server.start();