This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>title</title> | |
<script language="JavaScript" src="test.js"></script> | |
<script type="text/javascript"> | |
alert(100); | |
</script> | |
<link rel="stylesheet" href="test.css" type="text/css"> | |
<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gyazz' | |
re = [] | |
wiki = Gyazz.wiki('EpisoPassData') | |
wiki.pages.each do |page| | |
page.text.split(/\n/).each { |line| | |
if line =~ /^=(.*)$/ then | |
s = $1.sub(/\?$/,'') | |
re << s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# PNGを自力で生成する (masui 2014/07/13 14:26:29) | |
# | |
# こういう感じのRGB配列をPNGにする | |
# data = [ | |
# [[0, 0, 0], [100, 100, 100], [200, 200, 200]], | |
# [[0, 0, 0], [100, 100, 100], [200, 200, 200]], | |
# [[0, 0, 0], [100, 100, 100], [200, 200, 200]] | |
# ] | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (ev, arg) { | |
var document = window.content.document; | |
var location = encodeURIComponent(document.location); | |
var title = encodeURIComponent(document.title); | |
var win = window.open('http://gyazz.masuilab.org/__write?name=osusume&title='+title+'&data=[['+location+']]'); | |
win.close(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
require 'nokogiri' | |
require 'httparty' | |
require 'net/http' | |
require 'uri' | |
# | |
# FirefoxをアクティブにしてURLを取得 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`defaults read com.apple.LaunchServices | grep -C3 'LSHandlerURLScheme = http;' | grep LSHandlerRoleAll | uniq` =~ /"(.*)"/ | |
browser = | |
case $1 | |
when /safari/i then "Safari" | |
when /chrome/i then "Chrome" | |
else "Firefox" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
system "wget -O /tmp/nexus6 https://play.google.com/store/devices/details/Nexus_6_64_GB_%E3%83%80%E3%83%BC%E3%82%AF%E3%83%96%E3%83%AB%E3%83%BC?id=nexus_6_blue_64gb" | |
res = system "grep '近日発売' /tmp/nexus6 > /dev/null" | |
unless res | |
system "echo 'Nexus6 is out.' | mail masui@pitecan.com" | |
system "echo 'Nexus6 is out.' | mail masui@masui.org" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system "wget -O /tmp/nexus6 https://play.google.com/store/devices/details/Nexus_6_64_GB_%E3%83%80%E3%83%BC%E3%82%AF%E3%83%96%E3%83%AB%E3%83%BC?id=nexus_6_blue_64gb" | |
res = system "grep '近日発売' /tmp/nexus6 > /dev/null" | |
unless res | |
system "echo 'Nexus6 is out.' | mail masui@pitecan.com" | |
system "echo 'Nexus6 is out.' | mail masui@masui.org" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://datamarket.azure.com/account/keys でキーを取得 | |
# window.bing_acctkey に入ってるものとする | |
window.bing_search = (keyword, callback) -> | |
if typeof window.bing_acctkey != 'undefined' | |
url = "https://api.datamarket.azure.com/Bing/Search/Image?$format=json&Query='#{keyword}'" | |
encoded = btoa "#{window.bing_acctkey}:#{window.bing_acctkey}" # base64エンコード | |
$.ajax | |
url: url | |
type: 'PUT' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <linux/input.h> // struct input_event とか | |
main() | |
{ | |
int mouse_fd = open("/dev/input/event0", O_RDONLY); | |
if (mouse_fd < 0) { | |
fprintf(stderr,"can't open mouse device\n"); |
OlderNewer