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 / herokudiff.sh
Created Dec 28, 2013
Heroku utility commands
View herokudiff.sh
#!/bin/bash
# Run the same Heroku command on `production` and `staging` remotes,
# and then diff the output.
if [ `git remote | grep production | wc -l ` == "1" ] && \
[ `git remote | grep staging | wc -l ` == "1" ]; then
echo "As you wish..."
command=""
for var in "$@"
do
command=$command"$var "
View python-dependencies.md

An example use-case

I’m a noob about python dependency management—here’s what’s confusing me. Using virtualenvwrapper, with no existing venvs, let’s say I create a new directory and save a copy of the system packages I have installed with pip:

coby at vulcan in ~/tmp
➜ mkdir python-test && cd python-test
 
coby at vulcan in ~/tmp/python-test
➜ pip freeze > system-requirements.txt
@cobyism
cobyism / jekyll-light-inkscape.diff
Created Oct 30, 2013
Diff to make light version of jekyll logo visible in inkscape.
View jekyll-light-inkscape.diff
diff --git a/jekyll-logo.svg b/jekyll-logo.svg
index d448ed7..64bf54b 100644
--- a/jekyll-logo.svg
+++ b/jekyll-logo.svg
@@ -19,7 +19,7 @@
</i:pgfRef>
</foreignObject>
<g i:extraneous="self">
- <g id="logo-bg-dark">
+ <g id="logo-bg-dark" display="none">
@cobyism
cobyism / deployment.rake
Created Oct 13, 2013
Rake tasks for Heroku Deployments.
View deployment.rake
#####################################
# Rake tasks for Heroku Deployments #
#####################################
#
# Assumptions:
# - You’re using Heroku to deploy a Rails application or similar.
# - You have two remotes, one called 'production', and one called 'staging'.
# - You have a 'master' branch, and it usually contains stable code.
#
# Usage:
@cobyism
cobyism / osx-install-media.md
Last active May 21, 2019
Command to create installable OS X USB drive.
View osx-install-media.md

Creating a bootable macOS USB installer

  • First, plug in an 8GB (or bigger) USB drive, and use Disk Utility to erase it
  • If you use the default settings, you should wind up with a blank drive at /Volumes/Untitled.

With that volume in place, and with the macOS installer sitting in /Applications/Install\ macOS\ [VERSION].app, run the following command in your terminal to create a bootable install media (for Sierra):

sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
@cobyism
cobyism / design-workflow-q-a.md
Last active Feb 23, 2017
Q&A on design workflows.
View design-workflow-q-a.md

Design workflow Q&A

James Kirkpatrick sent me some questions about designing in the browser, and design workflows in general to help with his dissertation at the University of Ulster. Here are my responses.

Question: Do you feel that designing in browser is fast becoming the standard in web design, or do you feel that there will still be a few die-hard designers that will refuse to adopt the idea?

I think it is definitely on its way to becoming the standard, especially with the improvements in the pipeline in terms of what’s possible within developer tools (source-map support for Sass, CoffeeScript and so forth). It’s not catching on as quickly as I feel it should be though (given the benefits I feel it has), and honestly I feel like that’s simply because it’s hard for people to drop the tools they know and love cold-turkey. It can take a while to adjust to new tools and workflows, and to be able to afford the time in-between where you just have to accept that you won’t be as productive as usual is

@cobyism
cobyism / gridism.scss
Created Sep 19, 2013
Quick experiment: Gridism’s main stylesheet ported to SCSS.
View gridism.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 Jan 21, 2019
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
View rpi-vnc-on-boot.md

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

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
You can’t perform that action at this time.