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
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat - >> ~/.ssh/authorized_keys' |
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
#!/usr/bin/env ruby | |
message_file = ARGV[0] | |
message = File.read(message_file) | |
def range_rand(min,max) | |
min + rand(max-min) | |
end | |
bads = [ | |
"Yeah, bitch! Magnets!", |
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
var data, id, that, type, url; | |
that = this; | |
id = this.$el.attr('id'); | |
url = this.$el.attr('action'); | |
type = this.$el.attr('method'); | |
data = this.$el.serialize(); | |
$.ajax({ | |
url: url, |
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
var gulp = require('gulp'); | |
var bower = require('main-bower-files'); | |
var rename = require('gulp-rename'); | |
gulp.task('copy', function() { | |
gulp | |
.src(bower()) | |
.pipe( rename({ extname: '.scss'}) ) | |
.pipe( gulp.dest('./scss') ); | |
}); |
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
<h2 id="{{ include.id }}"> | |
<a class="header-link" href="#{{ include.id }}"> | |
<i class="fa fa-link"></i> | |
</a> | |
{{ include.title }} | |
</h2> |
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
(this will presume you have migrations table already created, e.g. CREATE TABLE schema_migrations (migrations TEXT);) | |
Migration 1. | |
key: foobar | |
up: CREATE TABLE table_name (column_1 INT); INSERT INTO schema_migrations (migrations) VALUES ('foobar'); | |
down: DROP TABLE table_name; DELETE FROM schema_migrations WHERE migrations = 'foobar'; | |
Migation 2. |
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
mkdir tmp | |
touch tmp/foo.txt tmp/bar.txt | |
zip -r tmp.zip tmp | |
mv tmp.zip /Volumes/External-Drive | |
cd /Volumes/External-Drive | |
unzip tmp.zip | |
ls -l tmp | |
. | |
.. | |
foo.txt |
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
// javascripts/components/foo.js | |
export default function() { | |
console.log('foo'); | |
} |
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
// gulp | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
gulp.task('sass', function () { | |
gulp.src('./sass/**/*.scss') | |
.pipe(sass()) | |
.pipe(gulp.dest('./css')); | |
}); |
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
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var concat = require('gulp-concat'); | |
var filter = require('gulp-filter'); | |
var streamify = require('gulp-streamify'); | |
var watch = require('gulp-watch'); | |
var bower = require('main-bower-files'); | |
var es = require('event-stream'); |
OlderNewer