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
'use strict' | |
angular.module modulePage | |
.config ($stateProvider) -> | |
$stateProvider | |
.state 'upload', | |
url: '/upload' | |
templateUrl: '/page/upload/upload.html' | |
controller: 'UploadCtrl' |
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
'use strict' | |
angular.module modulePage | |
.factory 'Download', | |
()-> | |
el = document.createElement 'a' | |
el.id = 'shodow-download-anchor' | |
el.style.display = 'none' | |
el.target = '_blank' | |
el.download = '' | |
document.body.appendChild el |
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 -*- | |
import MeCab | |
import random | |
def make_strange(message, options={}): | |
tagger = MeCab.Tagger('mecabrc') | |
text = message.encode('utf-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
なるほど = (なるほどな)-> if なるほどな is なるほど then 'なるほど(なるほど)' else "なるほど(#{なるほどな})" | |
console.log なるほど(なるほど(なるほど(なるほど(なるほど(なるほど(なるほど(なるほど(なるほど)))))))) |
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_']; |
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
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
// 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
<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
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, {})) |
OlderNewer