Skip to content

Instantly share code, notes, and snippets.

background: -webkit-linear-gradient(0deg, #be0344, #be0344 0.88%,
rgba(229, 70, 127, 0.91) 0.881%, #e5467f);
/* 1px hairline, using a GIF */
background: repeat-x bottom left
url(data:image/gif;base64,R0lGODlhAQACAPABAMjHzP///yH/C1hNUCBEYXRhWE1QAz94cAAh+QQFAAABACwAAAAAAQACAAACAgwKADs=);
background-size: 100% 1px;
/* 1px hairline, using SVG (background-size property not required) */
background: repeat-x bottom left
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1' height='1'><rect fill='#ff0000' x='0' y='0' width='1' height='0.5'/></svg>");
<!DOCTYPE html>
<html>
<head>
<title>Not from Rails</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link href="startup-640x1096.png"
media="(device-width: 320px) and (device-height: 568px)
@madrobby
madrobby / gist:6442305
Last active December 22, 2015 07:59
Freckle CSV import file for accounts with hashtags.
Date,Person,Client/Project,Minutes,Hours,Tags,Description,Billable,Invoiced,Invoice Reference,Paid
2013-08-01,Thomas Fuchs,A new client,480,8.0,meeting,had the first #meeting with our new client,yes,no,,no
2013-06-28,Devon Kreider,Gear GmbH,60,1.0,marketing,#marketing,yes,no,,no
2013-06-27,Devon Kreider,Spannerwerx,60,1.0,"design, phone-call","Finishing the poster #design and made a #phone-call to ""Mary""",yes,no,,no
2013-06-21,Devon Kreider,Ukulele Beach,60,1.0,"WorkingOnMyTanLines, work_sandals",#WorkingOnMyTanLines #work_sandals,yes,no,,no
2013-06-21,Devon Kreider,Ukulele Beach,60,1.0,beach_meeting,#beach_meeting was a success,yes,no,,no
2013-06-21,Devon Kreider,Surf Shop,60,1.0,design,#design,yes,no,,no
2013-06-14,Thomas Cannon,Institute for Awesome,60,1.0,"billing, blog",#billing* #blog,no,no,,no
2013-06-14,Thomas Cannon,Institute for Awesome,90,1.5,billing,#billing*,no,no,,no
@madrobby
madrobby / gist:5489174
Created April 30, 2013 14:43
Install Phantom.js on Ubuntu 10.04 and tweak for better rendering quality.
sudo apt-get update
sudo apt-get install libfreetype6 libfreetype6-dev libfontconfig
# /etc/apt/sources.list should contain these:
# deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
# deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
sudo echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
$ npm run-script dist
> [email protected] dist /Users/thomasfuchs/Projects/zepto
> coffee make dist
dist/zepto.js: 54.6 KiB
dist/zepto.min.js: 26.6 KiB
dist/zepto.min.gz: 9.7 KiB
compression factor: 5.6
@madrobby
madrobby / easter.js
Created March 30, 2013 13:47
Easter code golfing! Who can make this smaller? Bonus points for fitting it in a tweet. You can use a different algorithm, but it should work for any gregorian date.
// date of easter, call function with the 4-digit year as argument
function (a,b,c,d,e,f,g,h,i,j,k,l,m){return b=a%19,c=~~(a/100),d=a%100,e=~~(c/4),f=c%4,g=~~((c+8)/25),h=~~((c-g+1)/3),i=(19*b+c-e-h+15)%30,j=~~(d/4),k=d%4,l=(32+2*f+2*j-i-k)%7,m=~~((b+11*i+22*l)/451),a+"-"+~~((i+l-7*m+114)/31)+"-"+((i+l-7*m+114)%31+1)}
// f(2013) -> "2013-3-31"
// f(2012) -> "2012-4-8
// f(1775) -> "1775-4-16"
@madrobby
madrobby / localfonts.conf
Created March 28, 2013 18:57
Fontconfig for better renderings
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- from https://wiki.ubuntu.com/Fonts -->
<!--
.fonts.conf
release 6.3.23
Licensed under GNU GPL
================================
Process: Chocolat [45094]
Path: /Applications/Chocolat.app/Contents/MacOS/Chocolat
Identifier: com.chocolatapp.Chocolat
Version: 1.6 (1.6)
Code Type: X86-64 (Native)
Parent Process: launchd [225]
User ID: 501
Date/Time: 2013-03-07 07:45:48.667 -0500
OS Version: Mac OS X 10.8.2 (12C3006)
function isRetina(){
return (('devicePixelRatio' in window &&
devicePixelRatio > 1) ||
('matchMedia' in window &&
!matchMedia("(-moz-device-pixel-ratio:1.0)").matches))
}