Skip to content

Instantly share code, notes, and snippets.

View orisano's full-sized avatar

Nao Yonashiro orisano

View GitHub Profile
@hayajo
hayajo / changelog_en.md
Last active November 2, 2024 12:48
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@yyaammaa
yyaammaa / gist:7480613
Last active June 30, 2017 02:50
Butter Knifeの紹介

Butter Knifeの紹介

Android用のView Injectionライブラリである Butter Knife について解説します (といいますか、サイトに書いてあることをほとんどそのまま日本語にしただけです) 。

概要

Butter Knifeは ActionBarSherlock などでお馴染みの Square のJake WhartonさんによるAndroid用のView Injectionライブラリです。

使い方

このライブラリの目的が、

  • Activity, ViewのfindViewByIdを楽に書く
@hgfischer
hgfischer / benchmark+go+nginx.md
Last active April 11, 2024 22:09
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
//;%(
a='main=eval';
eval(a)
{}
main()
{eval('puts=console.log');
//).tap{
puts("Hello World");}
@voluntas
voluntas / pypy.rst
Last active April 8, 2019 05:06
PyPy コトハジメ
@tompng
tompng / smooth_random.js
Last active August 29, 2015 14:23
なだらかに変化する乱数列(乱数じゃないけどもそんなかんじの).js
function gaussRandom(){
var r=Math.sqrt(-2*Math.log(Math.random()));
var t=2*Math.PI*Math.random();
return r*Math.sin(t);
}
//smoothed with exp(kx)-2exp(2kx)+exp(3kx), k=1/tscale, variance=1
function SmoothRandom(tscale){
this.tscale=tscale||1;
this.a1=0;
@voluntas
voluntas / webrtc.rst
Last active October 29, 2024 04:43
WebRTC コトハジメ
@voluntas
voluntas / webrtc_sfu_dev.rst
Last active August 15, 2024 11:57
WebRTC SFU コトハジメ

WebRTC SFU コトハジメ

日時:2023-12-03
作:voluntas
バージョン:2023.1
url:https://voluntas.github.io

この記事が良いと思ったらこの記事に Star をお願いします

@BretFisher
BretFisher / docker-for-mac.md
Last active November 8, 2024 13:45
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@kazuho
kazuho / fizzbuzz.cc
Last active February 2, 2020 11:34
compile-time fizzbuzz that emits optimized code
#include <cstdio>
struct String {
char b[1000];
size_t size;
constexpr String() : b(), size() {}
};
constexpr String operator+(String x, char y) {
x.b[x.size] = y;