Skip to content

Instantly share code, notes, and snippets.

View sters's full-sized avatar
🐱
meow!

sters sters

🐱
meow!
View GitHub Profile
@sters
sters / ncvid.js
Last active December 13, 2015 21:29
"Supporterz" all night hackathon.
//--------------------------------------------------
// please read:
// 某ニコニコできる動画サイトにログインして、
// マイリストページでこのスクリプトを実行
// (ChromeならF12おしてconsoleにはっつけてください)
// すると、上から連続で再生してくれるかもしれない何かです。
//
// クロスフェードっぽい何かもついてますがうまくいかないかも...
// 動画が読み込めなかったときやエラーなど例外的なサムシングは考えてません。
//
@sters
sters / npp_myfile_compiler.rb
Created March 13, 2013 15:00
Script to compile some script language. for me. I use notepad++ and NppExec plugin. this plugin can run to any shell program. But don't process according to file extension, so write this script in process according to file extension.
###################################################
#
# Any file compile run on shell.
# Can't some file joint compile that regret...
#
# target : win32, Ruby
# necessary : Ruby # can simple file name processing and command run.
# gem/win32console # color set
#
# support : haml It mean, "can compile command run".
@sters
sters / ohirune.html
Last active December 17, 2015 10:39
ohirune
<!--
moved: https://github.com/sters/ohirunejs
-->
<html>
<body>
<a id="ohirune" target="_blank">おひるね</a>
<a id="okita" target="_blank">おきた</a>
<script type="text/javascript">
<!DOCTYPE HTML>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>スタイルシートそのものを変更する</title>
<link rel="stylesheet" type="text/css" href="style-a.css" id="style-a" disabled="true">
<link rel="stylesheet" type="text/css" href="style-b.css" id="style-b" disabled="true">
<style id="style-c">
#foo {
@sters
sters / shower.js
Last active December 21, 2015 15:19
例のアレ
(function(){
function auto_font_size($, target){
var temp = $("<div>").css({
"display" : "none",
"font-family" : target.css("font-family"),
}).text(target.text()).appendTo("body");
var maxWidth = $(window).width();
var tempWidth = temp.width();
@sters
sters / cookieCheat.js
Last active December 23, 2015 03:49
cookie grandma
var d=document,e=d.createEvent("MouseEvents");
e.initMouseEvent("click");
setInterval(function(){
d.getElementById("bigCookie").dispatchEvent(e);
}, 100);
@sters
sters / rot.js
Created November 24, 2013 10:04
var target = "happybirthday";
var r=function(x,r){var s=String,a=Array,b=s.prototype.charCodeAt,c=b.call("a",0);return s.fromCharCode.apply(s,a.prototype.map.call(x,function(v){return c+((b.call(v,0)+r)%26);}))};
for(var i=0;i<26;i++) console.log(r(target, i));
@sters
sters / random_hash.js
Created November 24, 2013 10:09
random hash
(function(f,l,m){
f(function(){
l.hash=m.random().toString(36);
f(arguments.callee, 100);
})
})(setTimeout, location, Math);
@sters
sters / encodetest.js
Last active December 29, 2015 18:59
✌('ω'✌ )三✌('ω')✌三( ✌'ω')✌
// usage:
//
// search(encodeURIComponent)
//
// or Other encode / escape function
//
function search(encodeFunc) {
for(var i=0; i<65536; i++) {
@sters
sters / jqDeferred
Last active January 1, 2016 08:39
jqDeferred
$.when(naga_______i_shori())
.done(function() {
console.log("OK!");
}).fail(function() {
console.log("fail...");
}).always(function() {
console.log("way");