Skip to content

Instantly share code, notes, and snippets.

View savelee's full-sized avatar

Lee Boonstra savelee

View GitHub Profile
@savelee
savelee / gist:ee2cf546493551d1448a
Created July 1, 2015 13:10
Start Sencha Webserver from the command-line
sencha fs web -p 80 start -map /path/to/webroot/
@savelee
savelee / gist:5724e99ed51e79cf22c7
Created July 8, 2015 13:42
Show all hidden files on Mac OSX
defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder
@savelee
savelee / gist:85d56cd290f755752b66
Created July 9, 2015 06:21
Dokku add environment variable
dokku config:set appname KEY=value
@savelee
savelee / gist:662f58ebcee7889ade60
Last active August 29, 2015 14:24
Shutdown digital ocean ubuntu droplet
sudo shutdown -h now
@savelee
savelee / gist:dc4d9917df453b068905
Created July 10, 2015 14:22
Restart Apache on Ubuntu
sudo service apache2 restart
@savelee
savelee / gist:6701c707b8f5805c9cf7
Created July 10, 2015 14:36
Setup php mail Ubuntu digital ocean
//login to your droplet.
//1. output the hostname
hostname
//2. modify the hosts
nano /etc/host
//3. the first line in this file, should use the hostname on the end. For example: "Lee"
127.0.0.1 localhost localhost.domainname Lee
@savelee
savelee / gist:0e7023e53049bafd597d
Created July 26, 2015 14:56
MongoDb Digital Ocean
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-14-04
//Check if mongo is running
service mongod status
//You can also stop, start, and restart MongoDB using the service command (e.g. service mongod stop, server mongod start).
@savelee
savelee / gist:304b861a1417f33fc669
Created July 27, 2015 07:49
Create node module
yo nodejs
//install modules globally
npm install packagename -g
//install modules and save in package.json
npm install packagename --save
@savelee
savelee / gist:2be4dcadb7638b005365
Last active August 29, 2015 14:26
Unload & Reload discoveryd to Fix DNS & Wi-Fi Failures in OS X Yosemite
This trick involves refreshing the discoveryd service by unloading and reloading it with the launchctl command.
This is a bit curious but apparently it works for some users, suggesting there could be an issue with discovery or resolving DNS on some Yosemite Macs.
It’s certainly worth a try if the above tricks failed to resolve your wi-fi connectivity problems in OS X 10.10, as there are a fair amount of positive reports with this one:
Open Terminal (found in /Applications/Utilities/ or with Spotlight) and enter the following command:
`sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist`
Hit return and enter an admin password to use the sudo command
Now run the following command to reload discoveryd (this used to be called mDNSResponder)
`sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist`
@savelee
savelee / gist:510e93bd6f499e6c66e5
Created July 29, 2015 15:34
Dokku listing containers
Listing running containers: dokku ps
To kill a container:
dokku kill <id-container>
https://docs.docker.com/articles/basics/