This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# -------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
# 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/*" | |
], | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Recommended sublime plugins | |
- GitGutter (https://github.com/jisaacks/GitGutter) | |
- SideBarEnhancements (https://github.com/titoBouzout/SideBarEnhancements) | |
- ToggleQuotes (https://github.com/spadgos/sublime-ToggleQuotes) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"always_show_minimap_viewport": true, | |
"atomic_save": false, | |
"auto_indent": true, | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createStore = require('redux').createStore; | |
// constants | |
const CHANGE_NAME = 'CHANGE_NAME'; | |
const CHANGE_AGE = 'CHANGE_AGE'; | |
const CHANGE_NAME_AND_JOB = 'CHANGE_NAME_AND_JOB'; | |
// actions | |
function changeName(name) { | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createStore(reducer, initialState) { | |
let currentState = initialState; | |
let listeners = []; | |
function getState() { | |
return currentState; | |
} | |
function dispatch(action) { | |
// Create the state from the reducer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#about ul { | |
display: flex; | |
justify-content: center; | |
flex-wrap: wrap; | |
} | |
#about li{ | |
max-width: 230px; | |
margin: 10px; | |
} |
OlderNewer