Skip to content

Instantly share code, notes, and snippets.

View stryju's full-sized avatar

tomasz stryjewski stryju

  • Meta
  • Kailua, HI
  • 12:24 (UTC -10:00)
View GitHub Profile
@stryju
stryju / _missing_zurb_push-pull.scss
Created March 20, 2013 15:05
missing zurb push / pull classes
// the missing push/pull classes:
.push-1 {
right: auto;
left: (1/12) * 100%;
}
.pull-1 {
right: (1/12) * 100%;
left: auto;
}
@stryju
stryju / _normalize_custom.scss
Created March 28, 2013 10:00
custom normalize - normalize the things you NEED
/*! normalize.css v2.1.0 | MIT License | git.io/normalize */
/*
* usage:
* @import "normalize_custom";
*
* // this will print out ALL selectors
* @include normalize();
*
* // this will print out minimal set (*) -- you can see the list of "excluded" tags below
var comments = [];
function digDeeper( el, i ){
if ( el.nodeType === 8 ){
comments.push( el.nodeValue.replace( /^\s*|\s*$/g, '' ));
return;
}
if ( ! el || ! el.childNodes || ! el.childNodes.length ){
return;
@stryju
stryju / settings.json
Created September 24, 2013 13:06
sublime settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Dayle Rees Color Schemes/Peacock.tmTheme",
"default_line_ending": "unix",
"draw_minimap_border": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"flatland_sidebar_tree_small": true,
"flatland_square_tabs": false,
"folder_exclude_patterns":
function either() {
foreach ( func_get_args() as $arg ){
if ( is_string( $arg ) ? !! trim( $arg ) : !! $arg ) {
return $arg;
}
}
return false;
}
@stryju
stryju / package.json
Created January 17, 2014 15:57
use nodemon for watching local changes and restarting your server with simple `npm start`
{
"scripts": {
"start": "nodemon -w . index.js"
},
"dependencies": {
"nodemon": "~1.0.9"
}
}
var scrollPromise;
function scrollFix ( $window, $timeout, $delegate ) {
function smoothScroll() {
var y = $window.scrollY;
if ( y < 5 ) {
$window.scrollTo( 0, 0 );
[
{
"note" : "note 1"
},
{
"note" : "note 2"
}
]
@stryju
stryju / svg-size.js
Last active August 29, 2015 14:02
get inline SVG size in Firefox (AMD way)
/* global
define: false
*/
define( function ( ) {
'use strict';
function px( cs, prop ) {
return parseInt( cs.getPropertyValue( prop ) || 0, 10 );
}
@stryju
stryju / index.html
Last active August 29, 2015 14:04
d3 transition on nested groups
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>d3 transition on nested groups</title>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var width = 960;