[7] pry(main)> Date.parse("2014-06-25")
=> Wed, 25 Jun 2014
[8] pry(main)> Date.parse("2014-06-25").next_month
=> Fri, 25 Jul 2014
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 = Client.new(host: "https://example.com", headers: [ "Authorized: Bearer aaaabbbbcccc" ]) | |
client.get("/foo", { page: 1 }) | |
client.post("/bar", { context: "blahblah" }) | |
client.put("/bar/1", { context: "barbar" }) | |
client.delete("/bar/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
### Keybase proof | |
I hereby claim: | |
* I am asonas on github. | |
* I am asonas (https://keybase.io/asonas) on keybase. | |
* I have a public key whose fingerprint is 350A C32D 7811 73C7 576A BED2 E98E 9D5B 7CB4 C7AC | |
To claim this, I am signing this object: |
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
class Subscriber | |
constructor: (topic) -> | |
@client = new Paho.MQTT.Client("m11.cloudmqtt.com", 33563, "web_" + parseInt(Math.random() * 100, 10)); | |
console.log topic | |
@topic = topic | |
connect: -> | |
options = | |
useSSL: true | |
userName: gon.username |
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 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2' | |
head 'https://vim.googlecode.com/hg/' | |
sha256 'd0f5a6d2c439f02d97fa21bd9121f4c5abb1f6cd8b5a79d3ca82867495734ade' | |
version '7.4.488' | |
def features; %w(tiny small normal big huge) end |
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
[1] pry(main)> require 'itunes-client' | |
=> true | |
[2] pry(main)> include Itunes | |
=> Object | |
[3] pry(main)> Itunes::Player.current_track | |
=> #<Itunes::Track:0x007fc15b260380 @album="GO! GO! MANIAC", @artist="放課後ティータイム[平沢唯・秋山澪・田井中律・琴吹紬・中野梓 (CV:豊崎愛生、日...", @name="GO! GO! MANIAC (Instrumental)", @persistent_id="71629FBDBB8E9809", @track_count="4", @track_number="3", @year="0"> | |
[4] pry(main)> |
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 fib(n) { | |
var a = 1, b = 0, p = 0, q = 1, c = n, tmp_1, tmp_2; | |
while (c > 0) { | |
if (c % 2 === 0) { | |
tmp_1 = p * p + q * q; | |
tmp_2 = (q + 2 * p) * q; | |
p = tmp_1; | |
q = tmp_2; | |
c = c / 2; |
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
^ | |
gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -O2 -fno-tree-dce -fno-optimize-si | |
bling-calls -fPIC -c ossl_pkey_dh.c | |
gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -O2 -fno-tree-dce -fno-optimize-si | |
bling-calls -fPIC -c ossl_pkey_ec.c | |
ossl_pkey_ec.c: In function ‘ossl_ec_group_initialize’: | |
ossl_pkey_ec.c:761:24: warning: assignment makes pointer from integer without a cast [enabled by default] | |
method = EC_GF2m_simple_method(); | |
^ | |
ossl_pkey_ec.c:815:29: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function) |
[ec2-user@ip-10-156-122-178 ~]$ ab -n 1000 -c 100 http://kosendj-bu.in/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking kosendj-bu.in (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests