Skip to content

Instantly share code, notes, and snippets.

Coby Chapple cobyism

Block or report user

Report or block cobyism

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cobyism
cobyism / schema.rb
Created May 29, 2011
Current SARMS db schema
View schema.rb
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
View fresh-install.mkd
@cobyism
cobyism / widgets_controller.rb
Created Apr 15, 2012
Controller code that is replaced by the new InheritedResources::Base inheritance stuff.
View widgets_controller.rb
class WidgetsController < ApplicationController
# GET /widgets
# GET /widgets.json
def index
@widgets = Widget.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @widgets }
end
View hello.asciidoc

This is body text

Optional Title
Code listing line one

Code listing line two

And more body text.

View gist:3694843
unnamed gist
wat is this i don't even
@cobyism
cobyism / news.ycombinator.com.js
Created Sep 18, 2012
Highlight things mentioning GitHub on Hacker News using defunkt/dotjs
View news.ycombinator.com.js
// Highlight articles on/about GitHub
$('span, a, p').filter(':contains("github")')
.css('background-color', '#ffff66')
$('span, a, p').filter(':contains("GitHub")')
.css('background-color', '#ffff66')
@cobyism
cobyism / emojibomb.rb
Last active Mar 9, 2017
Generate a random emoji bomb via the command-line
View emojibomb.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'
# Run `emojibomb` to get three emoji.
# Run `emojibomb N`, where `N` is a positive integer to get N emoji.
response = open("http://www.emoji-cheat-sheet.com/")
html = response.read
emoji = html.scan(/:\S+:/)
@cobyism
cobyism / octophone-lockscreen.md
Created Nov 17, 2012
Octophone Lock/Home Screens
View octophone-lockscreen.md
View diy-cardboard-laptop-stand.md

DIY Cardboard Laptop Stand

DSCF0319

Here’s how to make your own laptop stand out of cardboard.

Ingredients

  • One piece of cardboard, approximately 53cm wide x 14cm high (cut up an old parcel box or something).
  • Scissors
@cobyism
cobyism / gh-pages-deploy.md
Last active Sep 17, 2019
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).
View gh-pages-deploy.md

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).

You can’t perform that action at this time.