Skip to content

Instantly share code, notes, and snippets.

View shokai's full-sized avatar

Sho Hashimoto shokai

View GitHub Profile
{
"name": "merge-rename-page",
"displayName": "merge-rename-page",
"exported": 1588048716,
"pages": [
{
"title": "カレーうどん",
"created": 1575745867,
"updated": 1588048263,
"lines": [
{
"pages": [
{
"title": "豆腐削除",
"lines": [
"豆腐削除",
"ギフトポイントはそのまま利用することはできず、配信中の視聴者数やコメント数などの複数の条件と合わせて、翌日オーブとして運営から届きます。"
]
}
]
@shokai
shokai / README.md
Last active November 16, 2018 11:48
日付をcache名として、同じURLのHTTP Responseを複数Cache storageに保存したらどうなるかテスト

日付をcache名として、同じURLのHTTP Responseを複数Cache storageに保存したらどうなるかテスト

gyazo

@shokai
shokai / nginx.conf
Last active September 9, 2018 15:05
nginx websocket proxy
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
{
"exported": 1481397720102,
"name": "template-ja",
"displayName": "Template-ja",
"pages": [
{
"title": "鈴木",
"titleLc": "鈴木",
"lines": [
"鈴木",
{
"pages": [
{
"title": "鈴木",
"titleLc": "鈴木",
"lines": [
"鈴木",
"[https://gyazo.com/9c82212785ba079d6b7d383066f1fe20] ",
"",
"(メンバーの説明をここに書きましょう)",
{
"pages": [
{
"title": "鈴木",
"titleLc": "鈴木",
"lines": [
"鈴木",
"[https://gyazo.com/9c82212785ba079d6b7d383066f1fe20] ",
"",
"(メンバーの説明をここに書きましょう)",
#!/usr/bin/env ruby
module Volume
def self.settings
`osascript -e "get volume settings"`
end
def self.volume
`osascript -e "(get volume settings)'s output volume"`
end
require 'memcached'
cache = Memcached.new 'localhost:11211'
puts cache.set('user', 'shokai', 3)
puts cache.get('user')
sleep 3
begin
puts cache.get('user') # should expire
rescue Memcached::NotFound => e
"clang -o conftest -I/usr/local/Cellar/ruby/2.3.1/include/ruby-2.3.0/x86_64-darwin14 -I/usr/local/Cellar/ruby/2.3.1/include/ruby-2.3.0/ruby/backward -I/usr/local/Cellar/ruby/2.3.1/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe conftest.c -L. -L/usr/local/Cellar/ruby/2.3.1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -lruby.2.3.0 -lpthread -ldl -lobjc