Skip to content

Instantly share code, notes, and snippets.

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")
### 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:
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
@asonas
asonas / vim.rb
Last active August 29, 2015 14:16 — forked from uasi/vim.rb
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
@asonas
asonas / a.rb
Created February 6, 2015 08:03
[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)>
[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
@asonas
asonas / a.js
Last active August 29, 2015 14:01
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;
^
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

イベントタイトル

KosenDJ-bu #1

日程

5/30(土) 15:00〜21:00

場所

  • sabaco