Skip to content

Instantly share code, notes, and snippets.

View rrreeeyyy's full-sized avatar
😣
confounded

Ryota Yoshikawa rrreeeyyy

😣
confounded
View GitHub Profile
Starman:
- Preforking standalone HTTP server
- Based on Catalyst::Engine::HTTP::Prefork by Andy Grundma
- Ported to Plack by Tatsuhiko Miyagawa
- Uses Net::Server::PreFork
- Supports HTTP/1.1
- Pipelined requests
- Chunked request/response
- Keep-Alives
- Graceful restart with HUP (No shutdown with QUIT yet)
@eidantoei
eidantoei / c2g.rb
Created May 30, 2011 16:48
Visualizing `uniq -c` result
#!/usr/bin/env ruby
require 'optparse'
bar_string = "|"
bar_max = 30
max = 0
$es_s=["\033[34m","\033[36m","\033[32m","\033[33m","\033[35m","\033[31m"]
$es_b="\033[30m"
@simonw
simonw / log.lua
Created June 22, 2011 09:28
Query logging for mysql-proxy
--[[
Copyright (C) 2007 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@rjz
rjz / cs-jq-plugin-template.coffee
Created September 3, 2012 17:01
Coffeescript jQuery Plugin Class Template
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->
@ympbyc
ympbyc / FunctionalJs.md
Last active July 8, 2024 08:55
Functional JavaScript

Functional JavaScript

2013 Minori Yamashita ympby@gmail.com

-- ここにあなたの名前を追記 --

目次

@rrreeeyyy
rrreeeyyy / ipvs_http_api.rb
Created June 17, 2014 17:50
IPVS Web API using mruby-ipvs and mruby-simplehttpserver.
services = {}
def body_parser(body)
params = {}
body.split('&').each do |x|
tokens = x.split('=', 2)
if tokens && tokens.size == 2
params[tokens[0]] = HTTP::URL::decode(tokens[1])
end
end

atom-shellとNode-Webkitとの技術的な違い

Node-Webkitのように、atom-shwllはJavaScriptとHTMLでデスクトップアプリケーションを書くダメのプラットフォームを提供します。そしてシステムのローレベルな権限へのアクセスも可能です。

しかしながら、そこには根本的な違いがあって、atom-shellはNode-Webkitとは完全に別なプロダクトになっています。

1. Entry of application

Node-WebkitはアプリケーションのエントリポイントがWebページで、package.jsonにメインページを指定します。そしてそれがアプリケーションのメインウィンドウとしてブラウザで開かれます。

tiny-nghttpd: port 8082
trusterd : port 8081
[matsumotory@ubuntu14-04-64:/usr/local/trusterd/htdocs]$ h2load -c 500 -m 100 -n 2000000 http://127.0.0.1:8082/index.html
starting benchmark...
spawning thread #0: 500 concurrent clients, 2000000 total requests
progress: 10% done
progress: 20% done
@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!
@imjasonh
imjasonh / markdown.css
Last active May 24, 2024 22:56
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}