Skip to content

Instantly share code, notes, and snippets.

View inooid's full-sized avatar

Boyd Dames inooid

View GitHub Profile
@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: ->
@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: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 January 24, 2016 16:33
My sublime text preferences
{
"always_show_minimap_viewport": true,
"atomic_save": false,
"auto_indent": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
@inooid
inooid / redux-explaination-on-stream.js
Created October 29, 2016 14:14
An attempt to teach people Redux on stream
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 {
@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 / redux.js
Created December 16, 2016 14:53
Simple Redux source code... kinda
function createStore(reducer, initialState) {
let currentState = initialState;
let listeners = [];
function getState() {
return currentState;
}
function dispatch(action) {
// Create the state from the reducer
@inooid
inooid / style.css
Last active December 21, 2016 23:21
Helping out someone's css assignment for uni
#about ul {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
#about li{
max-width: 230px;
margin: 10px;
}
@inooid
inooid / style.css
Last active December 21, 2016 23:22
Helping out someone's css assignment for uni
#column1 .ruleitem:last-child {
margin-bottom: 0;
}
### Keybase proof
I hereby claim:
* I am inooid on github.
* I am inooid (https://keybase.io/inooid) on keybase.
* I have a public key whose fingerprint is 4488 9104 18BF 4F7C FCC5 8C4F DF7C EB8E 7D98 0071
To claim this, I am signing this object: