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
↑のStar押してみて! |
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 'rubygems' | |
require 'em-http' | |
require 'json' | |
EM.run { | |
username = 'tw_user' | |
password = 'tw_password' | |
buffer = "" | |
http = EventMachine::HttpRequest.new('http://stream.twitter.com/1/statuses/filter.json').post({ |
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
diff --git a/lib/tempfile.rb b/lib/tempfile.rb | |
index 8bdf086..fbe0e7d 100644 | |
--- a/lib/tempfile.rb | |
+++ b/lib/tempfile.rb | |
@@ -194,6 +194,15 @@ class Tempfile < DelegateClass(File) | |
ObjectSpace.undefine_finalizer(self) | |
end | |
+ def mv(destination_path) | |
+ raise TypeError, "unlinked Tempfile" unless self.path |
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
" based on vimclojure/syntax/clojure.vim | |
" | |
function! s:paren() | |
if get(b:, 'rainbowParen', 0) == 1 | |
return | |
endif | |
syn match rainbowParenError "]\|}\|)" | |
syn region rainbowParenLevel0 matchgroup=rainbowParen0 start="(" matchgroup=rainbowParen0 end=")" contains=rainbowParenLevel1 | |
syn region rainbowParenLevel1 matchgroup=rainbowParen1 start="(" matchgroup=rainbowParen1 end=")" contained contains=rainbowParenLevel2 | |
syn region rainbowParenLevel2 matchgroup=rainbowParen2 start="(" matchgroup=rainbowParen2 end=")" contained contains=rainbowParenLevel3 |
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 'tmpdir' | |
Earthquake.init do | |
command :aview do |m| | |
if m[1] =~ /^http/ | |
url = m[1] | |
else |
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
create this file in your /root folder | |
$ fleetctl load swapon.service | |
$ fleetctl start swapon.service | |
This will create swap file on all nodes of your CoreOS cluster without prior setup. | |
See also http://cloudinit.readthedocs.org/en/latest/topics/examples.html#adjust-mount-points-mounted |
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
const bitcoin = require("bitcoinjs-lib") | |
const bip39 = require('bip39') | |
const bip32utils = require('bip32-utils') | |
const insight = require('insight-cli').RestClient | |
const bip44_account = (m, BIP44) => m.deriveHardened(BIP44.PURPOSE).deriveHardened(BIP44.COINTYPE).deriveHardened(BIP44.ACCOUNT) | |
const mnemonic = "" | |
const seed = bip39.mnemonicToSeed(mnemonic, "") |
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 fs = require('fs') | |
const | |
PATH_CURRENCY = "path/to/trade_log.csv", | |
PATH_TOKEN = "path/to/token_trade_log.csv" | |
var currencyCsv = fs.readFileSync(PATH_CURRENCY, 'utf-8'), | |
tokenCsv = fs.readFileSync(PATH_TOKEN, 'utf-8') | |
var result = {} |
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 fs = require('fs') | |
const | |
PATH_SELLS = __dirname + "/../files/coincehck/buys-2017-11-30.csv", | |
PATH_BUYS = __dirname + "/../files/coincehck/sells-2017-11-30.csv" | |
var sellsCsv = fs.readFileSync(PATH_SELLS, 'utf-8'), | |
buysCsv = fs.readFileSync(PATH_BUYS, 'utf-8') | |
var result = {} |
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
/* | |
* TipmonaTipBookmarklet.js | |
* | |
* When you see | |
* https://twitter.com/EXAMPLEUSER/... | |
* Then you jump to | |
* https://twitter.com/intent/tweet?text=@tipmona%20tip%20@EXAMPLEUSER%201%20Mona%20を贈ります。 | |
* And when you see | |
* https://twitter.com/EXAMPLEUSER/status/xxxxxxxx | |
* Then you jump to |
OlderNewer