Skip to content

Instantly share code, notes, and snippets.

$("div.check_boxes label").each(function() {
attrId = $(this).find(">:first-child").attr("id");
$(this).attr("for", attrId);
});
$("div.radio_buttons label").each(function() {
attrId = $(this).find(">:first-child").attr("id");
$(this).attr("for", attrId);
});
@vurral
vurral / founctions.scss
Created September 2, 2013 14:07
Extended Foundation Media Queries
// remember the QUERIES
// no predefined query for small ( < 768px ), cause you should design mobile first!
@media #{$retina-small} { /* retina < 768px */ }
@media #{$small} { /* > 768px (medium) */ }
@media #{$retina-medium} { /* > 768px (retina-medium) */ }
@media #{$medium} { /* > 1280px (large) */ }
@media #{$retina-large} { /* > 1280px (retina-large) */ }
@media #{$large} { /* > 1440px (xlarge) */ }
@vurral
vurral / .gitconfig
Created September 13, 2013 03:16 — forked from robmiller/.gitconfig
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@vurral
vurral / desc.txt
Created October 12, 2013 12:42
install auto launch daemon for mongodb on mac
To have launchd start mongodb at login:
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
Then to load mongodb now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Or, if you don't want/need launchctl, you can just run:
mongod
@vurral
vurral / dabblet.css
Created April 20, 2015 16:00
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background: #f06;
background: white;
min-height: 100%;
}
.icon {
@vurral
vurral / dabblet.css
Created April 20, 2015 16:01
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;

New computer setup


Format the drive

  1. Restart with cmd-R or cmd-D
  2. Erase drive / 3x if second-hand
  3. Reinstall MacOS

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

@mixin linear-gradient($angle, $color1, $offset1, $color2 ,$offset2:100, $color3:null, $offset3:100, $color4:null, $offset4:100, $color5:null, $offset5:100){
$angle_webkit:'left top, left bottom';
$angle_svg:'%20x2%3d%220%25%22%20y2%3d%22100%25%22';
$color-stop1_css:'#'#{$color1}' '#{$offset1}'%';
$color-stop2_css:',#'#{$color2}' '#{$offset2}'%';
$color-stop3_css:'';
$color-stop4_css:'';
$color-stop5_css:'';
$color-stop1_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color1}'%22%20offset%3d%22'#{$offset1}'%25%22%2f%3e';
$color-stop2_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color2}'%22%20offset%3d%22'#{$offset2}'%25%22%2f%3e';