Skip to content

Instantly share code, notes, and snippets.

View 0mg's full-sized avatar
💤

Ray Milligram 0mg

💤
View GitHub Profile
@0mg
0mg / ttp.js
Created April 3, 2010 13:50
ttp linker
// ==UserScript==
// @include *
// ==/UserScript==
/* このスクリプトは Opera 10.10 をクラッシュさせるので使用禁止 */
window.addEventListener("DOMContentLoaded", function() {
var texts = document.
evaluate(".//text()[contains(self::text(),'ttp') and not(ancestor::a) and not(ancestor::textarea) and not(ancestor::script)]",
document.body, null, 7, null);
@0mg
0mg / ctrlbs.js
Created May 2, 2010 18:19
Ctrl + BackSpace
http://twitter.com/m_satyr/status/13263591680
"javascript:location=location.href.replace(/^(\w+:\/+)[^.]+.(?!.*\/.)|.[^/]+.?$/,'$1')"
@0mg
0mg / sdelete.js
Created June 17, 2010 07:58
Secure Delete SendToTarget
//
// Secure Delete SendToTarget
//
if (WScript.arguments.length > 0) {
var wsh = WScript.createObject("WScript.Shell");
var fso = WScript.createObject("Scripting.FileSystemObject");
//
// 引数を配列にする
//
for (var wsh_args = [], i = 0; i < WScript.arguments.length; ++i) {
#include <windows.h>
//
// メインウィンドウプロシージャ
//
LRESULT CALLBACK mainWndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp){
HDC hdc;
char c[512];
switch(msg){
case WM_MOUSEMOVE:
hdc = GetDC(hwnd);
@0mg
0mg / gist:461386
Created July 2, 2010 13:50
Geolocation
javascript: navigator.geolocation.getCurrentPosition(function(p) {
location.href = "http://maps.google.com/maps?q=" +
p.coords.latitude + "," + p.coords.longitude; });
javascript:
for(z=[4228151417,67404933,2080670725,67405029,67404933,83654777],
f=i="";m=z[i++];f+="\n")for(;m>>>=1;)f+=m&1?"●":"○";alert(f)
/* 0. ペイントツール */
javascript:
(function(_){return _.map(function(_){
return parseInt(_.split("").reverse().join(""),2)<<1|1})})(
/* 1. ここに 0,1 で絵を描く */
/* 上限 :
@0mg
0mg / googkbr.js
Created July 19, 2010 02:55 — forked from miya2000/google_opera_gkbr.js
Google Suggest Fix for Opera
// ==UserScript==
// @name Google Suggest Fix for Opera
// @include http://www.google.com/*
// @include http://www.google.co.jp/*
// ==/UserScript==
addEventListener("keypress", function(v) {
if (v.target.name === "q" && (v.keyCode === 38 || v.keyCode === 40) &&
!v.shiftKey) v.preventDefault();
}, true);
@0mg
0mg / twPromp9.user.js
Created July 27, 2010 03:46
Twitter Prompt (window.open)
// ==UserScript==
// @name Twitter Prompt
// @include http://mobile.twitter.com/+
// @description Tweet via window.prompt
// ==/UserScript==
/* Bookmarklet */
if (false) {
javascript: (function(s, t) {
if (s = prompt('いまどうしてる?', s)) confirm((t = s.slice(0, 140)) +
@0mg
0mg / twPrompt.js
Created July 27, 2010 07:59
Twitter Prompt (iframe.postMessage)
// ==UserScript==
// @name Twitter Prompt
// @include http://twitter.com/share?url=www.u.js
// @description Tweet via window.prompt
// ==/UserScript==
/* Bookmarklet */
if (false) {
javascript: (function(s, f, t, m, l) {
if (s = prompt('いまどうしてる?', s)) {
@0mg
0mg / gist.css
Created August 17, 2010 22:13
User CSS for gist.github
@import "user.css";
#header,
.site {
overflow: visible !important;
min-width : 0 !important;
}
.secondary {
float: none !important;
width: auto !important;
}