Skip to content

Instantly share code, notes, and snippets.

@jrcryer
jrcryer / Gruntfile.coffee
Created November 22, 2013 10:23
Gruntfile example of external configuration per project
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
require: grunt.file.readJSON 'source/config/requirejs.json'
paths: grunt.file.readJSON 'source/config/paths.json'
# Another it goes on...
@jrcryer
jrcryer / gist:5998714
Created July 15, 2013 09:44
oh-my-zsh theme
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")$reset_color"
ZSH_THEME_GIT_PROMPT_DIRTY="$fg_no_bold[red]+"
ZSH_THEME_GIT_PROMPT_CLEAN="$fg_no_bold[green]"
function get_pwd() {
echo "${PWD/$HOME/~}"
}
function put_spacing() {
@jrcryer
jrcryer / base.css
Last active December 13, 2015 21:59
WPUW - Complete
ul,ol {
list-style:none;
}
h1,h2,h3,h4,h5,h6,pre,code,p,caption,th,td {
}
address {
font-style:normal;
@jrcryer
jrcryer / gist:4981461
Created February 18, 2013 22:44
WPUW - Adding more posts
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Wordpress Users Wales</title>
<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" href="css/responsive.css" />
<!-- insert in head -->
<meta name="&rdquo;viewport&rdquo;" content="&rdquo;initial-scale=1.0," width="device-width&rdquo;" />
<!-- end -->
</head>
@jrcryer
jrcryer / gist:4981385
Created February 18, 2013 22:33
Desktop complete
/* Mobile First! */
body {
font-size: 100%;
}
#header {
padding: 12px 3.75%; /* (12 / 320) * 100 = 3.75 */
}
#title h1 {
font-size: 2em; /* (32 / 16) * 100 = 2 */
line-height: 1em;
@jrcryer
jrcryer / gist:4981189
Created February 18, 2013 22:02
WPUW - Adding header back
/* Mobile First! */
body {
font-size: 100%;
}
#header {
padding: 12px 3.75%; /* (12 / 320) * 100 = 3.75 */
}
#title h1 {
font-size: 2em; /* (32 / 16) * 100 = 2 */
line-height: 1em;
@jrcryer
jrcryer / gist:4981167
Created February 18, 2013 21:58
WPUW - Tablet
/* Mobile First! */
body {
font-size: 100%;
}
#header {
padding: 12px 3.75%; /* (12 / 320) * 100 = 3.75 */
}
#title h1 {
font-size: 2em; /* (32 / 16) * 100 = 2 */
line-height: 1em;
@jrcryer
jrcryer / gist:4981029
Created February 18, 2013 21:41
WPUW - Updating font-size
ul,ol {
list-style:none;
}
h1,h2,h3,h4,h5,h6,pre,code,p,caption,th,td {
}
address {
font-style:normal;
@jrcryer
jrcryer / gist:4980865
Created February 18, 2013 21:20
WPUW - Adaptive, not responsive!
/* Mobile landscape */
@media screen and (min-width: 480px) {
}
/* Small tablet portrait */
@media screen and (min-width: 600px) {
}
@jrcryer
jrcryer / gist:4980814
Created February 18, 2013 21:15
WPUW - Adding viewport scaling
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Wordpress Users Wales</title>
<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" href="css/responsive.css" />
<!-- insert in head -->
<meta name=”viewport” content=”initial-scale=1.0, width=device-width” />