Skip to content

Instantly share code, notes, and snippets.

Avatar
😇
Hello

Yoichi Fujimoto wozozo

😇
Hello
View GitHub Profile
View convert-less.php
<?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 Jun 6, 2012 — forked from leah/json-response.py
JSONResponse classes
View json-response.py
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 Sep 30, 2015 — forked from yudoufu/remove-utm.txt
utmのパラメータをURLから取り除くuser.js
View remove-utm.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 Jan 30, 2012 — forked from mach3/remove-utm.js
utmのパラメータをURLから取り除くブックマークレット
View remove-utm.txt
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('&'):'')})();
You can’t perform that action at this time.