Skip to content

Instantly share code, notes, and snippets.

View wozozo's full-sized avatar
😇
Hello

Yoichi Fujimoto wozozo

😇
Hello
  • Tokyo, Japan
  • 07:23 (UTC +09:00)
  • X @wozozo
View GitHub Profile
<?php
$filename = isset($argv[1]) ? realpath($argv[1]) : null;
$mixin = isset($argv[2]) ? $argv[2] : 'sprite-mixin';
$retina = isset($argv[3]) ? true : false;
if (!$filename) {
echo "fail", PHP_EOL;
exit(1);
}
@wozozo
wozozo / json-response.py
Created June 6, 2012 15:34 — forked from leah/json-response.py
JSONResponse classes
import re
import simplejson
from django.http import HttpResponse
from django.conf import settings
class JSONResponse(HttpResponse):
def __init__(self, request, data):
content = simplejson.dumps(data, indent=indent)
@wozozo
wozozo / remove-utm.user.js
Last active September 30, 2015 03:37 — forked from yudoufu/remove-utm.txt
utmのパラメータをURLから取り除くuser.js
/**
* Remove utm parameters from url
* ( Use this as bookmarklet )
*/
(function(){
var search, params, i, re;
search = location.search.replace( /^\?/, '' ).split( '&' );
params = [];
if (!search) return;
i = search.length;
@wozozo
wozozo / remove-utm.txt
Created January 30, 2012 15:00 — forked from mach3/remove-utm.js
utmのパラメータをURLから取り除くブックマークレット
javascript:(function(){var d,b,c,a;d=location;b=d.search.replace(/^\?/,'').split('&');c=[];a=b.length;while(a--){if(!b[a].match(/^utm_/)){c.push(b[a])}}d.href=d.pathname+((c.length)?'?'+c.join('&'):'')})();