Skip to content

Instantly share code, notes, and snippets.

View namusyaka's full-sized avatar

namusyaka namusyaka

View GitHub Profile
@namusyaka
namusyaka / html
Created February 28, 2012 17:10
KeyBind
<head>
<title>KeyBindテスト</title>
<script type="text/javascript" src="./keybind.js"></script>
<script type="text/javascript">
KeyBind.extend({
13 : function () {
alert(1);
}
});
@namusyaka
namusyaka / gist:1923139
Created February 27, 2012 11:22
Ruby4Misawa
# -*- encoding: UTF-8 -*-
require 'uri'
require 'open-uri'
require 'optparse'
require 'rubygems'
require 'nokogiri'
class Misawa
@namusyaka
namusyaka / gist:1893064
Created February 23, 2012 14:25
ふくさんぶつ
function SlideImage () {
return (this instanceof SlideImage) ? this.init() : new SlideImage();
};
(function (proto) {
proto.init = function () {
this.images = [];
this.display = null;
};
@namusyaka
namusyaka / gist:1862593
Created February 19, 2012 08:17
javascriptで記号プログラミング AND console.logで1を出力
[][(({}+{})[(([]^[]<{})<<([]^[]<{})<<([]^[]<{}))+([]^[]<{})])+(({}+{})[[]^[]<{}])+
((([][{}<<{}])+({}+{}))[[]^[]<{}])+((([]>{})+({}+{}))[(([]^[]<{})<<([]^[]<{}))+([]
^[]<{})])+((([]<{})+({}+{}))[[]^[]])+((([]<{})+({}+{}))[[]^[]<{}])+((([][{}<<{}])+
({}+{}))[[]^[]])+(({}+{})[(([]^[]<{})<<([]^[]<{})<<([]^[]<{}))+([]^[]<{})])+((([]<
{})+({}+{}))[[]^[]])+(({}+{})[[]^[]<{}])+((([]<{})+({}+{}))[[]^[]<{}])][(({}+{})[(
([]^[]<{})<<([]^[]<{})<<([]^[]<{}))+([]^[]<{})])+(({}+{})[[]^[]<{}])+((([][{}<<{}]
)+({}+{}))[[]^[]<{}])+((([]>{})+({}+{}))[(([]^[]<{})<<([]^[]<{}))+([]^[]<{})])+(((
[]<{})+({}+{}))[[]^[]])+((([]<{})+({}+{}))[[]^[]<{}])+((([][{}<<{}])+({}+{}))[[]^[
]])+(({}+{})[(([]^[]<{})<<([]^[]<{})<<([]^[]<{}))+([]^[]<{})])+((([]<{})+({}+{}))[
[]^[]])+(({}+{})[[]^[]<{}])+((([]<{})+({}+{}))[[]^[]<{}])](((({}+{})[(([]^[]<{})<<
@namusyaka
namusyaka / gist:1859993
Created February 18, 2012 16:13
ださく
window[(!{}+'')[-~[]]+(!{}+'')[-~-~[]]+({}+'')[-~-~-~-~[]]+(!!{}+'')[-~[]]+(!!{}+'')[[]&[]]](0);
@namusyaka
namusyaka / gist:1694149
Created January 28, 2012 12:27
convert colorCode into rgba
function toDecimal (hex) {
return parseInt(hex, 10).toString();
}
function toRGBA (color_code, alpha) {
if(color_code.length > 6)
return;
var rgba = 'rgba(';
<html>
<head>
<script type="text/javascript">
onload = function () {
var $1 = function (array) {
var element = document.createElement(array[0]);
for(var key in array[1])
element[key] = array[1][key];
@namusyaka
namusyaka / gist:1578260
Created January 8, 2012 12:48
helloworld
#!/usr/bin/ruby
print "Content-Type: text/html; charset=UTF-8;\r\n\r\n"
print "Hello world !"
@namusyaka
namusyaka / gist:1571280
Created January 6, 2012 16:23
auto greeting for chaberi
var t=setInterval(function(){},10000);
while(t){clearInterval(--t)}
location.href='javascript:'+function outprint(a, place, getmsg) {
if (place != "") {
_element = UseById(place);
if (a == 0) {
_element.innerHTML = getmsg
} else {
var element = document.createElement("div");
element.style.margin = "0px";
@namusyaka
namusyaka / gist:1552030
Created January 2, 2012 20:45
Skypeチャットでコンタクトリストに追加されてないメンバーに承認リクエストを飛ばすやつ
# -*- coding: utf_8 -*-
import Skype4Py
import time
def post(msg, event):
if event == 'SENT' and msg.Body == u"#sendContactRequestToChatMembers":
members = msg.Chat.Members
for i in range(members.__len__()):
members.Item(i).SetBuddyStatusPendingAuthorization(u"auto request")