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 client = require('cheerio-httpcli'); | |
var execSync = require('child_process').execSync; | |
client.fetch('http://attic.neophilia.co.jp/aozora/genjimonogatari/htmlfiles/kiritsubo.html', {}, (err, $, res) => { | |
$('p').each(function(idx) { | |
$(this)[0].children | |
.filter(item => item.type === 'text') | |
.map(item => item.data.replace(/(.+)/g, '')) | |
.forEach(item => execSync(`say ${item}`)); | |
}); |
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
npm install annict --save |
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
#!/bin/sh | |
npm install && \ | |
npm run docs && \ | |
git checkout gh-pages && \ | |
rm -rf classes interfaces assets index.html && \ | |
mv ./docs/* . && \ | |
rmdir docs && \ | |
git add . && \ | |
git commit -m "build $(git describe --abbrev=0 master) document : $(date)" && \ |
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
language: php | |
php: | |
- '5.4' | |
- '5.5' | |
- '5.6' | |
- '7.0' | |
- hhvm |
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
#!/bin/sh | |
brew install --with-cocoa --srgb --with-gnutls emacs | |
brew linkapps emacs |
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
"" |> IO.gets |> String.trim_trailing |> String.split(" ") |> Enum.map(&String.to_integer(&1)) |
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
# メタ情報 | |
NAME := myproj | |
VERSION := $(shell git describe --tags --abbrev=0) | |
REVISION := $(shell git rev-parse --short HEAD) | |
LDFLAGS := -X 'main.version=$(VERSION)' \ | |
-X 'main.revision=$(REVISION)' | |
# 必要なツール類をセットアップする | |
## Setup | |
setup: |
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 createPyramid(height){ | |
return Array.from({length: height}, (v,k) => k+1) | |
.map(r => ' '.repeat(height-r).concat('*'.repeat(r*2-1))) | |
.join('\n'); | |
} | |
console.log(createPyramid(10)); |
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
// client/node/server.js | |
// https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/node-server-rendering.md | |
var net = require('net'); | |
var fs = require('fs'); | |
var bundlePath = '../../app/assets/webpack/'; | |
var bundleFileName = 'webpack-bundle.js'; | |
var currentArg; |
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 IO::Socket::UNIX; | |
use JSON; | |
my $SOCK_PATH = "./node.sock"; | |
print $SOCK_PATH; | |
my $client = IO::Socket::UNIX->new( | |
Type => SOCK_STREAM(), | |
Peer => $SOCK_PATH, | |
) or die $!; |