Skip to content

Instantly share code, notes, and snippets.

@mhuneke
mhuneke / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../topeka-elements/theme.html">
@mhuneke
mhuneke / gist:5048429
Created February 27, 2013 14:49
slate config
# Config's directive: config name value
# Default to the current screen if the screen the reference does not exist.
config defaultToCurrentScreen true
# The base value for nudge percent calculation
config nudgePercentOf screenSize
# The base value for resize percent calculation
config resizePercentOf screenSize
@mhuneke
mhuneke / ngTap.js
Created November 6, 2012 18:02
Angular ng-tap directive
(function(angular) {
'use strict';
var directives = angular.module('app.directives', []);
directives.directive('ngTap', function() {
return function(scope, element, attrs) {
var tapping;
tapping = false;
element.bind('touchstart', function(e) {
@mhuneke
mhuneke / gimp-batchscale.py
Created October 18, 2012 18:17
Gimp batch scaling
import os, glob
import string
from gimpfu import *
scale_int = 8;
mime_type = 'jpg';
path = '/input-path/'
for infile in glob.glob( os.path.join(path, '*.' + mime_type) ):
image = pdb.gimp_file_load(infile, '1')
width = pdb.gimp_image_width(image)
height = pdb.gimp_image_height(image)
@mhuneke
mhuneke / livereload-client.js
Created October 18, 2012 15:10
Live Reload client-server
// <script src="node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js"></script>
var socket = io.connect();
socket.on('server:reload', function(message) {
document.location.reload();
});