Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
cd folder/with/icons
for string in `ls`
do
echo ${string%%.*} | tr '[:upper:]' '[:lower:]' | sed 's/-/_'
done
.ico-flag {
position: relative;
height: 11px;
&:before {
content: "";
position: absolute;
width: 14px;
height: 11px;
top: 50%;
left: 0;
$countries: australia brazil canada chile costa_rica croatia greece india iran italy mauritania poland russia rwanda south_africa spain united_states zimbabwe;
@tessalt
tessalt / gruntfile.js
Created August 29, 2013 17:07
Gruntfile for use with #yeoman #jade
// Generated on 2013-08-28 using generator-webapp 0.4.1
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

@tessalt
tessalt / datacontent.scss
Last active December 20, 2015 18:58
data-attributes in css
td:before {
content: " "attr(data-label)" : ";
}
@tessalt
tessalt / localwp.md
Created July 22, 2013 16:54
setup local wp from existing site #wp
  • grab .sql dump from phpmyadmin
  • find and replace root url in .sql file
  • grab new local wordpress copy curl -O http://wordpress.org/latest.tar.gz && tar xvzf latest.tar.gz && rm latest.tar.gz
  • create new local db in /MAMP
  • open localhost:8888/path/to/wordpress
  • create wp-config either through interface or edit file (reference to local db)
  • run install
  • import db
  • login
@tessalt
tessalt / teaching-html-css.md
Created July 17, 2013 01:00
Notes on Teaching HTML and CSS #llc

Notes on Teaching HTML and CSS

Kids

  • need to know the why of HTML: why does it need to be code to be a website?
  • browser isn't as smart as a human: has no eyes or brain
  • example of short story written in word processor: ask kids where each paragraph starts and ends and how they can tell
  • explain that browser doesn't see the indent at the beginning or the line break at the end, so we have to be specific about where the boundaries are
  • introduce tags: compare story in word processor to same story in HTML
@tessalt
tessalt / newmachine.md
Last active December 19, 2015 01:39
Setup dev machine
  • xcode
  • command line tools
  • iterm
  • homebrew ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  • that gcc compiler thing brew install apple-gcc42 or some shit
  • git
  • PATH=/usr/local/git/bin:$PATH (use new git instead of xcode git)
  • git config, set up ssh keys (github, heroku, beanstalk)
  • oh-my-zsh curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
  • sublime
@tessalt
tessalt / checkboxes.scss
Created March 21, 2013 19:47
styled checkboxes
input[type='checkbox'] {
opacity: 0;
float: left;
width: 18px;
}
input[type='checkbox'] + label {
margin: 0;
clear: none;
padding: 5px 0 4px 24px;