Skip to content

Instantly share code, notes, and snippets.

View roylines's full-sized avatar

Roy Lines roylines

View GitHub Profile
@dylansmith
dylansmith / ec2ssh.sh
Last active October 27, 2015 06:11
ec2 ssh access by "name" tag and instance number, with optional command to pass
#!/bin/bash
# USAGE:
# ./ec2ssh.sh <tag:name> <instance_num> [<remote_command>]
if [ $# -lt 2 ]
then
echo "Usage: `basename $0` <tag:name> <instance_num>"
exit 1
fi
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@k33g
k33g / lazy.coder.sh
Created February 27, 2012 22:34
Lazy.Coder Shell Script : create express.js app with dependencies
# /bin/sh
#chmod a+x lazy.coder.sh
#parameter : application name : ./lazy.coder.sh <application_name>
#Libs
#Gimme names
LIB1=jquery
LIB2=underscore.js
LIB3=backbone.js
@vitobotta
vitobotta / Importing posts from Wordpress into Jekyll.rb
Created March 26, 2011 22:50
The script I used to import posts from my Wordpress blog into a new Jekyll one.
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g}
require File.join(File.dirname(__FILE__), "downmark_it")
module WordPress
def self.import(database, user, password, table_prefix = "wp", host = 'localhost')
db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8')
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder}