Clojureを勉強している12
- Clojure Documentation
- ClojureDocs
- 関数名やマクロ名で検索できる
- See Alsoセクションが似たような機能の関数を集めていて便利
- Quick Referenceもまた便利。チートシートだ。
- Grimoire
- チートシートになってる。
- ClojureDocs
- clojure/clojure
import 'whatwg-fetch' | |
import store from './store' | |
function _buildUrl (path, query) { | |
let url = path | |
if (query !== undefined) { | |
let queryArray = [] | |
for (const key of Object.keys(query)) { | |
queryArray = [...queryArray, `${encodeURIComponent(key)}=${encodeURIComponent(query[key])}`] | |
} |
package books_test | |
import ( | |
. "github.com/onsi/ginkgo" | |
//. "github.com/onsi/gomega" | |
ta "github.com/stretchr/testify/assert" | |
"testing" | |
) |
Clojureを勉強している12
earthquake () { | |
/usr/bin/ssh -t dev 'socat STDIN,echo=0,icanon=0 SYSTEM:"reptyr $(cat /tmp/earthquake.pid)",pty,stderr,ignbrk=1' | |
sleep 20 | |
earthquake | |
} |
#!/usr/bin/env ruby | |
require "pty" | |
require "optparse" | |
require "tmpdir" | |
module PtyKeeper | |
module Core | |
def parse!(argv) | |
options = {} |
description "earthquake server" | |
author "babie wildheart <[email protected]>" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
setuid babie |
description "earthquake server" | |
author "babie wildheart <[email protected]>" | |
# start,stopは正常に動くがsocat&reptyrで繋いだ時、文字入力に不具合がある | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 |
description "earthquake server" | |
author "babie <[email protected]>" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
setuid babie |
# Earthquake.config[:event_chain] = { | |
# :favorite => [':retweet %{id}'], | |
# :favorited => [':update @%{him} thx 4 ur fav!'], | |
# :followed => ['unblock %{him}', ':follow %{him}'], | |
# } | |
module Earthquake::Input | |
def passivise(str) | |
if str.end_with?("ed") | |
str | |
elsif str.end_with?("e") |
require "date" | |
Earthquake.init do | |
_ = config[:save_image] ||= {} | |
_[:dir] ||= File.expand_path("./image", config[:dir]) | |
FileUtils.mkdir_p(_[:dir]) unless Dir.exist? _[:dir] | |
command :save_image do |m| | |
tweet = twitter.status(m[1]) | |
media = tweet["entities"]["media"] |