Skip to content

Instantly share code, notes, and snippets.

View ovidb's full-sized avatar

Ovidiu Bodea ovidb

View GitHub Profile
@ovidb
ovidb / app.config.ts
Created April 29, 2024 14:02
Intercom Plugin with Notifications for both iOS and Android
...
plugins: [
[
'./plugins/withIntercom',
{
appId: Env.INTERCOM_APP_ID,
androidApiKey: Env.INTERCOM_AND_API_KEY,
iosApiKey: Env.INTERCOM_IOS_API_KEY,
},
],
diff --git a/node_modules/config-plugin-react-native-intercom/build/withIntercomIOS.js b/node_modules/config-plugin-react-native-intercom/build/withIntercomIOS.js
index ac076f8..e3cb331 100644
--- a/node_modules/config-plugin-react-native-intercom/build/withIntercomIOS.js
+++ b/node_modules/config-plugin-react-native-intercom/build/withIntercomIOS.js
@@ -56,15 +56,7 @@ function modifyObjcAppDelegate({ contents, apiKey, appId, pushNotifications, })
contents = contents.replace(/#import "AppDelegate.h"/g, `#import "AppDelegate.h"\n#import <IntercomModule.h>\n#import <UserNotifications/UserNotifications.h>`);
}
const initMethodInvocationBlock = `[IntercomModule initialize:`;
- const registerIntercomPushCode = `
- // START INTERCOM PUSH
@ovidb
ovidb / gist:37f5836720cc29c2a3d075c2feeceb8f
Created April 20, 2021 08:05
Pomodoro Particle Internet Button
#include "InternetButton/InternetButton.h"
#include "math.h"
/* Here's a nice combination of features that I like to use.
Note the use of the allButtons function. */
InternetButton b = InternetButton();
int NO_LEDS = 12;
int focusDuration = 60 * 40;
@ovidb
ovidb / Swapping Ctrl with Alt in Ubuntu for Pinky's sake
Last active August 29, 2015 14:08
Swapping Ctrl with Alt in Ubuntu for Pinky's sake
I figure out that I need to make this swapping when my pinky started aching. I also mapped right Alt because I noticed some strange behavior with the window switcher, when using Alt_R. It would automatically switch on release, instead it waited for me to press Enter to do the switch so, I override it with Alt_R. Now it works like a charm and my pinky is very happy!
How it's done:
touch ~/.Xmodmap
then add contents from Xmodmap
then run:
/*
* Scaffolding
* Basic and global styles for generating a grid system, structural layout, and page templates
* ------------------------------------------------------------------------------------------- */
.container
Sets a width of 940px which also centres the content (clears floated elements before/after)
.container-fluid
Sets a minimum width of 940px (clears floated elements before/after)