Skip to content

Instantly share code, notes, and snippets.

View jldavid's full-sized avatar
💻

Jean-Luc David jldavid

💻
  • Toronto, Ontario
View GitHub Profile
@jldavid
jldavid / MongoDB.md
Created October 16, 2020 04:10
Setting Up MongoDB
  • Robo3T is recommended as a desktop client for managing the Mongo database.

CONNECT TO BITNAMI MEAN STACK

chmod 400 YourPEM.pem
ssh -i YourPEM.pem ubuntu@yourserveraddress.amazonaws.com
ssh -i YourPEM.pem bitnami@youripaddress

SETUP SSH TUNNEL TO CONNECT WITH ROBO 3T

@jldavid
jldavid / Bitnami.md
Last active October 16, 2020 04:01
Setting Up a Bitnami API
@jldavid
jldavid / Mac Keyboard Fix Cheat Sheet.txt
Created July 22, 2020 03:01
Mac Keyboard Fix Cheat Sheet
1. Reset the SMC. Turn off your Mac. Hold down Shift+Control+Option buttons. Push power button for 5 seconds.
Wait till the power supply turns amber. Details here: https://support.apple.com/en-ca/HT201295
2. Chrome will make the keyboard fail. Test to see if the keyboard works outside of Chrome. You can disable
Hardware Acceleration to improve performance.
@jldavid
jldavid / SourceTreeGithubFix.txt
Last active October 12, 2019 11:55
FIX: fatal: could not read Username for 'https://github.com': Device not configured in SourceTree
Right-click the repo in the main window, and select 'Convert to SSH'
@jldavid
jldavid / OutlookCommandReturnFix.sh
Last active September 10, 2021 15:17
FIX: Prevent Outlook for Mac from Auto-Sending Emails with Command+Return
defaults write com.microsoft.Outlook NSUserKeyEquivalents -dict-add "Send" "\U200B"
@jldavid
jldavid / FirewireFix.sh
Last active October 12, 2019 11:56
FIX: Continuous Connection Disconnection Firewire Cable Error
sudo killall -STOP -c usbd
@jldavid
jldavid / ReindexSpotlight.sh
Last active October 12, 2019 11:58
FIX: Reindex Spotlight if apps are missing on Mac during Search
#!/bin/sh
# Reference: https://apple.stackexchange.com/questions/62715/applications-dont-show-up-in-spotlight
sudo mdutil -a -i off
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo mdutil -a -i on /
do
sleep $[RANDOM%3600+1]
osascript -e "set volume 10"
say "balls"
done
@jldavid
jldavid / gist:b6d75a2b6d0723317a04
Created March 9, 2016 01:40
Facebook Login with ACAccountType
- (void)facebookLoginWithCompletion:(void (^)(NSString *userID, NSString *email, NSString *fullName))completion
{
self.accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
NSDictionary *options = @{
ACFacebookAppIdKey:FACEBOOKAPPID,
ACFacebookPermissionsKey: @[@"read_stream", @"basic_info"],