Skip to content

Instantly share code, notes, and snippets.

View cobyism's full-sized avatar
🤌

Coby Chapple cobyism

🤌
  • The Internet™ • Planet Earth™
View GitHub Profile
@cobyism
cobyism / gridism.scss
Created September 19, 2013 16:42
Quick experiment: Gridism’s main stylesheet ported to SCSS.
/*
* Gridism
* A simple, responsive, and handy CSS grid by @cobyism
* https://github.com/cobyism/gridism
*/
/* Preserve some sanity */
.grid,
.unit {
-webkit-box-sizing: border-box;
@cobyism
cobyism / rpi-vnc-on-boot.md
Last active September 18, 2022 14:18
How to set up a Raspberry Pi so that VNC starts on boot. Mostly from http://myraspberrypiexperience.blogspot.co.uk/p/setting-up-vnc.html

Starting VNC automatically on a Raspberry Pi

sudo apt-get install tightvncserver
vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565
  • Set up a password for access (optional)
sudo vi /etc/init.d/tightvncserver
@cobyism
cobyism / gh-pages-deploy.md
Last active June 21, 2026 22:49
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).

@cobyism
cobyism / diy-cardboard-laptop-stand.md
Created February 4, 2013 15:26
DIY Cardboard Laptop Stand

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 / octophone-lockscreen.md
Created November 17, 2012 07:32
Octophone Lock/Home Screens
@cobyism
cobyism / emojibomb.rb
Last active December 25, 2022 03:48
Generate a random emoji bomb via the command-line
#!/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 / news.ycombinator.com.js
Created September 18, 2012 11:19
Highlight things mentioning GitHub on Hacker News using defunkt/dotjs
// 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')
unnamed gist
wat is this i don't even

This is body text

Optional Title
Code listing line one

Code listing line two

And more body text.

@cobyism
cobyism / widgets_controller.rb
Created April 15, 2012 08:43
Controller code that is replaced by the new InheritedResources::Base inheritance stuff.
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