Skip to content

Instantly share code, notes, and snippets.

Avatar
🐈
Meow

Mike Diarmid Salakar

🐈
Meow
View GitHub Profile
@Salakar
Salakar / PushNotificationiOS.md
Last active May 10, 2019 — forked from indexzero/PushNotificationiOS.md
Draft proposal for Push Notifications and PushNotificationiOS
View PushNotificationiOS.md

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 — forked from indexzero/PushNotificationiOS.md
Draft proposal for Push Notifications and PushNotificationiOS
View PushNotificationiOS.md

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 Nov 18, 2018 — forked from KiaraGrouwstra/proxy-async.js
using ES6 Proxy to let Promises/Observables pretend like they're regular values
View proxy-async.js
// 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 Nov 16, 2018 — 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
View process1.js
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();