Skip to content

Instantly share code, notes, and snippets.

View cobyism's full-sized avatar
🤌

Coby Chapple cobyism

🤌
View GitHub Profile
@cobyism
cobyism / gh-gmail-label-script.js
Created May 5, 2014 22:25
GitHub Email Notification labeller script for Google Apps/Gmail
var my_teams = ["@github/css", "@github/design"] // Add any teams you want autodetected to this list
var base_label = ["GitHub"]
var my_teams_regex = new RegExp('(' + my_teams.join('|') + ')')
function GitHubThread(thread) {
this._thread = thread
// Determine why we got this message and label the thread accordingly.
//
@cobyism
cobyism / design-workflow-q-a.md
Last active February 23, 2017 07:48
Q&A on design workflows.

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 / dslchecker.rb
Created October 9, 2014 12:37
Started hacking on a BT DSL checker screen scraper thing
require 'rubygems'
require 'nokogiri'
require "net/http"
require "uri"
class DSLChecker
def check_phone_number(number)
params = { "TelNo" => number }
endpoint = URI.parse("http://www.dslchecker.bt.com/adsl/ADSLChecker.TelephoneNumberOutput")
response = Net::HTTP.post_form(endpoint, params)

Thinking outside the square (Joan Chapple)

Excerpt from: http://www.nzherald.co.nz/lifestyle/news/article.cfm?c_id=6&objectid=10517894
Author: Sarah Lang, for NZ Herald.
Originally published Monday Jun 23, 2008

Next door to Masson in a dark, decidedly-more-rudimentary house, Dr Joan Chapple sits, scanning the newspaper. Chapple's initial claim to consequence is as New Zealand's first hand surgeon and first female plastic surgeon. But at 78, with deep creases around her eyes, she couldn't be much more removed from the botoxed nip and tuck mercenaries.

@cobyism
cobyism / herokudiff.sh
Created December 28, 2013 17:16
Heroku utility commands
#!/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 "

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 October 30, 2013 15:52
Diff to make light version of jekyll logo visible in inkscape.
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 October 13, 2013 22:49
Rake tasks for Heroku Deployments.
#####################################
# 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 / 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 / octophone-lockscreen.md
Created November 17, 2012 07:32
Octophone Lock/Home Screens