Skip to content

Instantly share code, notes, and snippets.

@dvessel
dvessel / Share Screen Shot.scpt
Last active August 29, 2015 13:59
AppleScript to capture screen shots and upload them with SCP.
-- Requires public key encryption setup for the remote server.
-- This also assumes LaunchBar is installed.
property the_url : "http://example.com/path/"
property save_folder : "/Users/bob/Sites/example.com/path/"
property scp_remote : "bob@example.com:/www/example.com/path/"
on run
set tmp_name to do shell script "date +'%Y-%m%d-%H%M%S'" & ".png"
@dvessel
dvessel / ns_class.php
Created February 8, 2011 06:18
For resolving 960.gs classes in the NineSixty Drupal theme. (new version)
<?php
/**
* @file
* Functions related resolving grid classes.
*/
// Used by the ns_resolve_class() function.
define('END', 999);
@dvessel
dvessel / RendElements.php
Created March 3, 2011 06:43
RendElements Class
<?php
/**
* Example uses from the page hook when working with a render array.
*
* $elements = new RendElements($page);
*
* Returns a reference to the header. 'header' is the select string.
*
* $header = $elements('header');
@dvessel
dvessel / RecursiveMultiFilterIterator.php
Created March 9, 2011 01:32
Class abstract extended from FilterIterator and implements RecursiveIterator.
<?php
/**
* @file RecursiveMultiFilterIterator.php
* @brief Class abstract extended from RecursiveFilterIterator.
* @author Joon Park (joon@dvessel.com)
*/
/**
* This is an abstract class. Extended it with a custom accept() and/or
@dvessel
dvessel / responsive.html
Created January 27, 2012 05:15 — forked from lensco/responsive.html
Simple responsive design test page. More info here: http://bricss.net/post/16538278376/simple-responsive-design-test-page Modified to follow links.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@dvessel
dvessel / Set Window….applescript
Created August 13, 2012 00:37
AppleScript for controlling the front window. I use this with LaunchBar.
-- Sets Window size and position for the front most window.
-- Multi-monitor aware, takes arguments.
-- usage: [ center | left | right | full ], [ width x height ]
-- Default Options
property dPosition : "center"
property dWidth : 1066
property dHeight : 1300
@dvessel
dvessel / gist:3881806
Created October 12, 2012 22:00 — forked from schacon/gist:942899
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
@dvessel
dvessel / compass-retina-sprites.scss
Created November 21, 2012 14:37 — forked from thulstrup/compass-retina-sprites.scss
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
@dvessel
dvessel / css-stats-ack.sh
Created September 28, 2012 18:09 — forked from pjkix/css-stats-ack.sh
shell script to generate some css file statistics
#!/bin/bash
## v1.0.6
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }