Skip to content

Instantly share code, notes, and snippets.

View jun784's full-sized avatar
😄

jun784 jun784

😄
  • Tokyo
View GitHub Profile
@learner-long-life
learner-long-life / Rinkeby.md
Last active August 30, 2022 22:32
How to get on Rinkeby Testnet in less than 10 minutes

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent https://www.rinkeby.io/

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,

@voluntas
voluntas / mqtt.rst
Last active February 15, 2025 04:35
MQTT とはなんだったのか

MQTT とはなんだったのか

更新:2017-05-09
作者:@voluntas
バージョン:3.14
URL:http://voluntas.github.io/

MQTT をググって調べた人向け

@sile
sile / 0_raft.md
Last active May 27, 2024 07:53
Raft(分散合意アルゴリズム)について
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
<?php
$f = file_get_contents("url_obj.txt");
$a = array();
file_put_contents("urls.txt", "");
preg_match_all('/"http:.+?"/', $f, $a);
foreach($a[0] as $value) {
$value = str_replace("\\", "", $value);
$value = str_replace('"', "", $value);
file_put_contents("urls.txt", "{$value}\n", FILE_APPEND);
@keiono
keiono / d3js_day21.md
Last active January 1, 2016 00:29
D3.js Advent Calendar 2013 Day 21: D3.jsと周辺ツールを使ったデータの可視化

アプリケーションとしてまとめる

D3.js Advent Calendar 2013の21日目の記事です。今回はD3.jsのフォーマットや詳細技術というより、もう少し俯瞰的な視点で書いてみます。D3.jsを使う理由は、もちろん何らかのデータを可視化したいと言うことでしょうが、最終的にどのようなアプリケーションとしてまとめるかと言うゴールにはかなり幅があると思います。しかしそれでもいくつかの共通する課題が存在します。

テーブル形式のデータや、先のツールで書きだしたJSONなど、データを整えてD3.jsで使える形式として用意する事自体はそう難しいことではありません。手作業でスプレッドシートを使って作成してもいいし、スクリプト、もしくはOpenRefineなどといったツールで作成する方法もあります。そして一度D3.js内で扱える形式のデータが得られれば、それを様々な方法で可視化出来ます。そこから最終的な可視化を作成するプロセスで考えるべき事は次の二点でしょう:

  1. 最終的なアプリケーションとしてどうまとめるか
  2. そのアプリケーションを構築するモジュールの実装

この記事では、この2つについてまとめます。

@branneman
branneman / better-nodejs-require-paths.md
Last active April 11, 2025 10:39
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@Gab-km
Gab-km / whyILeftHeroku.rst
Last active December 30, 2022 10:56
何故私は Heroku から離れたか、および新しい AWS セットアップのメモ

何故私は Heroku から離れたか、および新しい AWS セットアップのメモ

原著者:Adrian Holovaty
原文:Why I left Heroku, and notes on my new AWS setup

金曜日、私は Heroku から Amazon Web Services(AWS) を直接使うように Soundslice を移行しました。私はこの変更ができてとても、そうとても嬉しくて、私がどうやったかということと、もし皆さんが同じような立場だったら何故それを検討すべきかということについて広く伝えたいと思います。

@dwayne
dwayne / HttpOrigin.md
Last active August 17, 2018 20:10
Things I've learnt while developing Facebook applications with Sinatra.

Problem

When logging is turned on you see the warning: attack prevented by Rack::Protection::HttpOrigin.

Fix

set :protection, :origin_whitelist => ['https://s-static.ak.facebook.com']

or

@torbjon
torbjon / puma_thin_unicorn_benchmarks_heroku_sinatra.md
Created December 14, 2012 16:39
puma, thin, unicorn benchmarks on heroku simpla sinatra app

##Procfile:

  • web: bundle exec thin -R config.ru start -p $PORT -e $RACK_ENV
  • web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
  • web: bundle exec puma -t 1:4 -b tcp://0.0.0.0:$PORT

##Benchmarks:

~ siege -c500 -t30s www.aijaberjoza.lv