Skip to content

Instantly share code, notes, and snippets.

View doodlemoonch's full-sized avatar

Matt Tortolani doodlemoonch

View GitHub Profile
@doodlemoonch
doodlemoonch / gist:973081
Created May 15, 2011 11:47 — forked from tlrobinson/gist:961765
Slightly less ghetto JavaScript console bookmarklet for MobileSafari
javascript:(function(){var l,r="";while(l=prompt(r)){try{r=String(eval(l));}catch(e){r="Error: "+e}}})();
@doodlemoonch
doodlemoonch / gist:1723746
Created February 2, 2012 14:36
Stops telephone number links being clickable in (modern) desktop browsrs
/* Desktops and laptops ----------- */
@media only screen and (min-width : 1224px) {
a[href^="tel:"] {
pointer-events: none;
}
}
$ phantomjs yslow.js --info basic --format plain http://www.bbc.co.uk
size: 387.0K (387053 bytes)
overall score: C (78)
url: http://www.bbc.co.uk/
# of requests: 54
ruleset: ydefault
page load time: 833
<input type="text" placeholder="Type and I'll disappear" />
.after::-webkit-input-placeholder {
color: #F00;
}
.after:-moz-placeholder {
color: #F00;
}
.after:-ms-input-placeholder {
color: #F00;
}
@doodlemoonch
doodlemoonch / README.md
Last active December 16, 2015 05:59 — forked from assimovt/README.md

Setup

Add the following gems to your Gemfile:

gem 'activeresource'
gem 'newrelic_api'

Update your bundle:

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<canvas id="canvas" height="1000" width="1000"></canvas>
</body>
</html>

After migrating from heroku to dokku, we had to also chance codeship so we deploy to dokku. I followed the following steps to successfully deploy to dokku.

  1. Save the public key of the codeship project. It is found in Project Settings > General Settings.
  2. Copy the public key to a file /tmp/codeship_projectname.pub.
  3. Make sure when pasting, all the contents are in a single line and not multiple lines.
  4. Add the public key to dokku using the following command in console. Reference.
cat /tmp/codeship_projectname.pub | ssh root@yourdokkuinstance "sudo sshcommand acl-add dokku [description]"