Skip to content

Instantly share code, notes, and snippets.

@ozero
ozero / gist:1007664
Created June 4, 2011 06:35
js: zoom the rect at mouse cursor
<html>
<head>
<script src="./jquery.js"></script>
<script>
zoomRatio=1;
loopCount=0;
mouseX=0;
mouseY=0;
@ozero
ozero / gist:1009007
Created June 5, 2011 14:43
js zoom in/out demo for sencha touch
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" href="resources/css-debug/sencha-touch.css" type="text/css" />
<script type="text/javascript" src="resources/sencha-touch-debug.js"></script>
<script>
@ozero
ozero / gist:1042343
Created June 23, 2011 10:51
Haru pdf example: bordered cell+text function
<?php
/**
* libHaru Utility Class
* @author ozero
*
*/
/*
example:
@ozero
ozero / gist:1241548
Created September 26, 2011 03:21
bookmarklet: format amazon-jp url as [domain]/dp/[asin]
javascript:(function(){var i,u,a,p;u=location.href;p=u.split("/");for(i=0;i<p.length;i++){if(p[i]=="dp"||p[i]=="a"){a=p[i+1];}}if(a){location="http://www.amazon.co.jp/dp/"+a;}})();
@ozero
ozero / nlivecomxml2tsv
Created December 19, 2011 01:07
niconico live comment xml 2 tsv macro for EmEditor
document.selection.Replace("thread=\x22.*?\x22","",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("no=\x22.*?\x22","",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("vpos=\x22.*?\x22","",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("mail=\x22.*?\x22","",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("premium=\x22.*?\x22","",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("anonymity=\x22.*?\x22","",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("</chat>","",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("<chat","",
@ozero
ozero / app.js
Created July 13, 2012 12:42
sencha touch 2 tabpanel load external html
// You should use Ext.application, not Ext.setup
Ext.application({
name: 'SampleLoad',
requires: ['Ext.Ajax'],
launch: function () {
Ext.create("Ext.tab.Panel", {
fullscreen: true,
tabBarPosition: 'bottom',
items: [
{
@ozero
ozero / Myclass.java
Created July 24, 2012 03:03
java helloworld sample on windows
public class Myclass {
public static void main(final String[] args){
System.out.println("hello");
}
}
/*
準備:
ディレクトリ
c:\opt\jt
@ozero
ozero / gist:4653378
Created January 28, 2013 06:07
List product page URLs from Amazon(jp) purchase history page with console.log(). Paste the code below to chrome's DevTools console, then hit enter.
var e = document.getElementsByTagName("a");
for(i = 0; i < e.length; i++){
var s = e[i].href;
if(s.match(/\/gp\/product\//)){console.log(s);}
}
This file has been truncated, but you can view the full file.
{"version":"0.2","x":0,"y":0,"width":768,"height":1024,"scale":1.0,"color":-1,"transparent":false,"strokes":[{"width":2.5,"color":-16777216,"type":"pen","data":[265.21875,257.71429443359375,0.5241014361381531,264.75,258.0714416503906,0.5451286435127258,264.75,258.0,0.5522547960281372,265.6875,257.14288330078125,0.5584155917167664,266.8125,256.11163330078125,0.5617933869361877,268.03125,255.00001525878906,0.5645091533660889,269.71875,253.50001525878906,0.5653743147850037,272.1458435058594,251.98678588867188,0.5656943321228027,275.2916564941406,250.0926055908203,0.5660142302513123,277.875,248.57144165039063,0.5662381052970886,279.515625,247.6919708251953,0.5663460493087769,280.96875,247.00001525878906,0.5662381052970886,284.044921875,245.40626525878906,0.5659144520759583,287.625,243.57144165039063,0.5653743147850037,289.9826354980469,242.40476989746094,0.564829409122467,292.3923645019531,241.2301788330078,0.5641880631446838,294.75,240.07144165039063,0.563642680644989,298.341796875,238.25892639160156,0.563263773
@ozero
ozero / info.json
Last active December 20, 2015 15:49
#enchantmoon
This file has been truncated, but you can view the full file.
{"version":"0.2","x":0,"y":0,"width":768,"height":1024,"scale":1.0,"color":-1,"transparent":false,"strokes":[{"width":2.5,"color":-16777216,"type":"pen","data":[350.90625,298.78574,0.40764925,352.26563,297.8527,0.4312636,353.90625,296.7143,0.4605662,354.8672,295.98663,0.4872978,356.15625,295.07144,0.5060726,358.67578,293.41965,0.5045509,361.78125,291.5,0.49533504,364.10764,290.18256,0.48989853,366.57986,288.84128,0.483872,368.71875,287.7143,0.4792875,370.86914,286.6607,0.47713736,372.65625,285.85715,0.4762184,374.6543,284.95984,0.47378483,376.6875,284.07144,0.47002006,378.78516,283.18304,0.4644993,380.90625,282.28574,0.4563016,383.0332,281.35718,0.44481903,385.125,280.4286,0.42868778,387.35742,279.41968,0.40150788]},{"width":2.5,"color":-16777216,"type":"pen","data":[357.1875,301.14288,0.4982864,357.09375,300.78574,0.5478118,357.375,300.07144,0.5932168,358.125,299.14288,0.59977186,359.34375,297.64288,0.6013995,361.125,296.14288,0.60221165,362.0918,295.24554,0.60226244,363.1875,294.28574,0.60221165,364.5293,29