Skip to content

Instantly share code, notes, and snippets.

@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;
.select-menu {
display: inline-block;
position: relative;
overflow: hidden;
height: 28px;
width: 150px;
background: #fff;
border: 1px solid #dbdbdb;
border-radius: 3px;
$("select").each(function(){
$(this).wrap('<div class="selectbox"/>');
$(this).after("<span class='selecttext'></span><span class='select-arrow'></span>");
var val = $(this).children("option:selected").text();
$(this).next(".selecttext").text(val);
$(this).change(function(){
var val = $(this).children("option:selected").text();
$(this).next(".selecttext").text(val);
});
});
@tessalt
tessalt / demosource.json
Last active December 14, 2015 01:28
clever fucking slider. REQUIREDS JQUERY IMAGESLOADED PLUGIN https://github.com/desandro/imagesloaded
{
"images": [
{
"id": 45,
"source": "http:\/\/lacourchodos.com\/dev\/wp-content\/uploads\/2013\/02\/1646-3-copy-2.jpg",
"caption": "Courtesy of Cheryl Rowley Design"
},
{
"id": 50,
"source": "http:\/\/lacourchodos.com\/dev\/wp-content\/uploads\/2013\/02\/OJISG-11-copy.jpg",
.dropdown {
position: relative;
}
.dropdown-content {
display: none;
position: absolute;
list-style: none;
z-index: 15;
&.show {
$(".collapse-tree a").click(function() {
var listItem = $(this).parent("li");
listItem.children("ul").slideToggle();
$(this).toggleClass("open");
return false;
});