Skip to content

Instantly share code, notes, and snippets.

View knice's full-sized avatar

Rob Knight knice

View GitHub Profile
@heyalexej
heyalexej / app.rb
Created February 3, 2014 23:11 — forked from dansimco/app.rb
Concise Sinatra Amazon S3 Upload Example (w/o Cloudfront)
require "rubygems"
require 'sinatra'
require "aws/s3"
get '/' do
return %Q{
<form action="upload" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<div>
<input type="file" name="file" value="" id="file">
</div>
@dhulihan
dhulihan / Gemfile
Last active December 16, 2015 01:49
Jekyll Compass Plugin for hooligan theme.
source :rubygems
gem "compass"
gem "sass"
gem "jekyll"
@cobyism
cobyism / gh-pages-deploy.md
Last active November 8, 2025 17:19
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@jrosczyk
jrosczyk / rwd.css
Created November 5, 2012 18:40 — forked from trey/rwd.css
Bootstrap's RWD breakpoints
/* http://twitter.github.com/bootstrap/scaffolding.html#responsive */
/* Landscape phones and down */
@media (max-width: 480px) { ... }
/* Landscape phone to portrait tablet */
@media (max-width: 768px) { ... }
/* Portrait tablet to landscape and desktop */
@media (min-width: 768px) and (max-width: 940px) { ... }
@nicerobot
nicerobot / README.md
Last active November 10, 2025 09:52
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh