Skip to content

Instantly share code, notes, and snippets.

@meleyal
meleyal / gulpfile.coffee
Created March 25, 2014 16:46
Gulp + Browserify + LiveReload
gulp = require 'gulp'
shell = require 'gulp-shell'
livereload = require 'gulp-livereload'
watchify = "watchify
app/assets/javascripts/initialize.coffee
--outfile app/assets/javascripts/bundle.js
--extension='.coffee'
--transform coffeeify
--transform debowerify
@meleyal
meleyal / osx.sh
Last active May 18, 2023 19:40
OSX defaults, based on http://mths.be/osx
##
# OSX defaults, based on http://mths.be/osx
#
# Ask for the administrator password upfront
sudo -v
# Set computer name (as done via System Preferences → Sharing)
sudo scutil --set ComputerName "air"
sudo scutil --set HostName "air"
@meleyal
meleyal / .scss-lint.yml
Created August 13, 2014 16:45
scss-lint `PropertySortOrder` config based on @mdo's Code Guide / recess
# based on http://git.io/hpl2Gw
linters:
PropertySortOrder:
order:
- position
- top
- right
- bottom
- left
@meleyal
meleyal / macvim-padding
Created February 24, 2012 18:42
Add padding to MacVim windows
defaults write org.vim.MacVim MMTextInsetTop '10'
defaults write org.vim.MacVim MMTextInsetLeft '10'
defaults write org.vim.MacVim MMTextInsetBottom '10'
defaults write org.vim.MacVim MMTextInsetRight '10'
@meleyal
meleyal / svn-recipes.sh
Created March 2, 2009 18:14
SVN recipes
# limit the log to the last 4 commits
svn log --limit 4
# show the log for a particular file
svn log foo.js
# create a new repo
svn import http://repo/path/<new-repo> -m "Initial import"
# create a new branch
@meleyal
meleyal / mirror.sh
Created October 20, 2013 11:37
Static website mirror with wget
wget -q --mirror -p --html-extension -e robots=off --base=./ -k -P ./ http://example.com
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@meleyal
meleyal / jquery.draghover.js
Created September 27, 2012 13:52
jquery.draghover.js
/*
jquery.draghover.js
Emulates draghover event by tracking
dragenter / dragleave events of element + children.
https://gist.github.com/gists/3794126
http://stackoverflow.com/a/10310815/4196
@meleyal
meleyal / Default (OSX).sublime-keymap
Last active March 18, 2016 11:25
Sublime Text settings
[
{ "keys": ["ctrl+shift+."], "command": "erb" },
{ "keys": ["ctrl+super+r"], "command": "reveal_in_side_bar" },
{ "keys": ["super+j"], "command": "swap_line_down" },
{ "keys": ["super+k"], "command": "swap_line_up" },
{ "keys": ["Y"], "command": "clipboard_copy",
"context": [{"key": "clipboardcopy_fake", "operator":"equal", "operand":true}, {"key": "setting.command_mode"}]
},
{ "keys": ["y"], "command": "clipboard_copy",
"context": [{"key": "clipboardcopy_fake", "operator":"equal", "operand":true}, {"key": "setting.command_mode"}]