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
local tym = require('tym') | |
function fit() | |
local model = tym.get_monitor_model() | |
print('fitting', model) | |
if model == 'DVI-I-1' then | |
tym.set('font', 'Monospace 16') | |
tym.apply() | |
end | |
return true |
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
start_time = Time.now | |
max = 1000000 | |
table = Array.new(max + 1, true) | |
prime_list = [2] | |
num = 3 | |
if table[num] == true | |
prime_list << num |
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
// 土 10/01 23/13 0 mm 0 cm 19/10 | |
// 日 10/02 25/12 0 mm 0 cm 19/10 | |
// 月 10/03 20/15 6 mm 0 cm 19/10 | |
// 火 10/04 20/12 0 mm 0 cm 19/9 | |
// 水 10/05 17/11 2 mm 0 cm 19/9 | |
// 木 10/06 16/10 9 mm 0 cm 19/9 | |
// 金 10/07 15/9 0 mm 0 cm 18/9 | |
// 土 10/08 17/9 0 mm 0 cm 18/8 | |
// 日 10/09 16/10 0 mm 0 cm 18/8 | |
// 月 10/10 11/7 0 mm 0 cm 18/8 |
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
set smoothscroll | |
map l nextTab | |
map h previousTab | |
map J scrollPageDown | |
map K scrollPageUp | |
map <C-n> nextTab | |
map <C-p> previousTab | |
copyTitle -> {{ | |
var title = document.title | |
document.addEventListener('copy', function(e) { |
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 extractDependingModuleCaches(name) { | |
function inner(name, targets) { | |
targets[name] = true | |
Object.keys(require.cache[name].children).forEach(function(key) { | |
var child = require.cache[name].children[key] | |
inner(child.filename, targets) | |
}) | |
return targets | |
} | |
return targets = Object.keys(inner(name, {})) |
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> | |
<body> | |
<div id="audioElementList"></div> | |
<input type="text" id="userInput"> | |
<button id="connectButton">connect</button> | |
</body> | |
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script> | |
<script src="http://cdn.peerjs.com/0.3/peer.js"></script> | |
<script type="text/javascript"> |
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
// http://www.google.com/design/spec/style/color.html#color-color-palette | |
$red-50: #ffebee | |
$red-100: #ffcdd2 | |
$red-200: #ef9a9a | |
$red-300: #e57373 | |
$red-400: #ef5350 | |
$red-500: #f44336 | |
$red-600: #e53935 | |
$red-700: #d32f2f |
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
Twitter = require 'twitter' | |
co = require 'co' | |
client = new Twitter | |
consumer_key: 'ち' | |
consumer_secret: 'ん' | |
access_token_key: 'ぽ' | |
access_token_secret: 'w' | |
posts = 'ウェイ↑チンポソイヤw'.split('').reverse() |
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://twitter.com/runa1210248/status/628554882966945795 | |
all = [] | |
gen = (tree, list)-> | |
if tree.length is 0 | |
all.push list.concat() | |
return | |
[0..tree.length-1].forEach (v, i)-> |
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
var url = require('url'); | |
var querystring = require('querystring'); | |
prettifyUrl = function (uglyUrl) { | |
var oldUrlObj = url.parse(uglyUrl); | |
var queryObj = querystring.parse(oldUrlObj.query); | |
if ('_escaped_fragment_' in queryObj) { | |
var escapedFragment = queryObj._escaped_fragment_; | |
delete queryObj['_escaped_fragment_']; |
NewerOlder