Skip to content

Instantly share code, notes, and snippets.

View inooid's full-sized avatar

Boyd Dames inooid

View GitHub Profile
@inooid
inooid / .bash-profile
Last active March 23, 2019 16:05
[Terminal] Docker-machine env shortcut
# 1. Add this to your .bash-profile or .zshrc and restart your terminal
function dm-env () {
if [ -z "$1" ] ; then
echo "\e[0;31mERROR:\e[0m no argument supplied"
return;
fi
eval "$(docker-machine env $1)"
echo -e "\033[33;32mSUCCESS:\e[0m docker-machine environment set to: $1"
}
@inooid
inooid / gist:b2c561f38468a9168c3f
Created September 18, 2015 10:56
Recommended sublime plugins
## Recommended sublime plugins
- GitGutter (https://github.com/jisaacks/GitGutter)
- SideBarEnhancements (https://github.com/titoBouzout/SideBarEnhancements)
- ToggleQuotes (https://github.com/spadgos/sublime-ToggleQuotes)
@inooid
inooid / Preferences.sublime-settings
Created June 4, 2015 10:11
Remove node_modules folder from indexing in Sublime Text 2/3
# This will remove the node_modules from the indexing, while still remaining
# its visibility in the sidebar
...
"binary_file_patterns": [
"*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico",
"*.eot", "*.pdf", "*.swf", "*.jar", "*.zip", "node_modules/*"
],
...
@inooid
inooid / gist:9adb294e63af3ae249a9
Last active December 1, 2016 12:43
Mov to Gif and beyond!
# Convert mov to mp4 and resize
ffmpeg -i input.mov -codec:v libx264 -profile: high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale='948:-1' -threads 0 output_file.mp4
# Convert mp4 to image frames
ffmpeg -i output_file.mp4 -r 10 frames/frame%03d.png
# Convert image frames to animated gif
convert -delay 5 -loop 0 frames/frame*.png output.gif
# --------
@inooid
inooid / .bash_profile
Created March 16, 2015 09:34
Google command to search on Google from the command line (Mac OS X)
# Command to open the webbrowser and immediately start searching
# for the right keyword.
#
# Usage:
# $ google test query
# $ => Opens the browser on http://www.google.com/search?q=test+query
#
google()
{
@inooid
inooid / routes.js.coffee
Created December 5, 2014 23:12
"Error while processing route: portfolio_item params is not defined ReferenceError: params is not defined" ~~ Eventhough my URL is: http://localhost:3000/#/portfolio/1
App.Router.map ->
@resource 'portfolio_items', { path: '/' }
@resource 'portfolio_item', { path: '/portfolio/:portfolio_item_id' }
# PortfolioItems#index
App.PortfolioItemsRoute = Ember.Route.extend( model: ->
portfolioItems
)
App.PortfolioItemRoute = Ember.Route.extend( model: ->