Skip to content

Instantly share code, notes, and snippets.

View sorah's full-sized avatar

Sorah Fukumori sorah

View GitHub Profile
#cloud-config
bootcmd:
- |
/bin/bash <<-'EOS'
#!/bin/bash
exec > >(tee /root/log.txt)
exec 2>&1
set -x
set -e
if [ -e /new ]; then
@sorah
sorah / a.js
Created September 9, 2012 07:30
listen to any events on socket.io / node EventEmitter; public domain own your risk
var SocketIO = require('socket.io')
, HTTP = require('http');
var orig_emit = SocketIO.Socket.prototype.$emit // http://nodejs.org/api/events.html#events_emitter_emit_event_arg1_arg2
SocketIO.Socket.prototype.$emit = function() {
orig_emit.apply(this, arguments)
var args = Array.prototype.slice.call(arguments);
var event = args.shift();
orig_emit.apply(this, ['anything', event, args]);
};
@sorah
sorah / a.sh
Created October 17, 2014 05:20
Homebrew relink if necessary
#!/bin/bash
for keg in /usr/local/Library/LinkedKegs/*; do
kegname="$(basename $keg)"
dir="$(find $keg/ -maxdepth 1 -type d | grep '\/\(sbin\|bin\|etc\|var\|lib\|include\|libexec\|share\)$' | head -n1)"
[ -z "${dir}" ] && continue
testee="$(find $dir -type f | head -n1 | sed -e "s|${keg}||")"
[ -f /usr/local/$testee ] || (echo $keg && brew unlink $kegname; brew link --force $kegname)
done
@sorah
sorah / winfont.css
Last active September 1, 2022 05:35
stylus windows japanese font
@font-face {
font-family: "メイリオ";
src: local("NotoSansCJKjp-Regular");
}
@font-face {
font-family: "Meiryo";
src: local("NotoSansCJKjp-Regular"), local("SourceHanSans-Regular");
}
@font-face {
font-family: "游ゴシック";
@sorah
sorah / a.rb
Last active August 19, 2022 04:23
n=1
a=["", ""]
$_.chomp.chars {|c| n.abs == 1 && (n*=c.to_i+1) || (s=n<=>0) && a[1<=>s] << c && (n-=s) && n!=s || (n*=-1) && n>0 && (p(a[1].to_f/a[0].to_f); a=["",""])}
# https://pbs.twimg.com/media/BvujU0bCIAMxa1O.jpg
/* ==UserStyle==
@name new.chunithm-net.com - 2/11/2022, 3:18:30 PM
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document url-prefix("https://new.chunithm-net.com/chuni-mobile/html/mobile/record/netBattlelogDetail") {
/* Insert code here... */

ISUCON10 本選当日マニュアル

課題アプリケーション XSUCON について

20XX 年、人類はオーガナイザー X41 氏の主催するパフォーマンスチューニングコンテスト「XSUCON」に夢中になっていた。しかし開催直前となったある日、最新版の XSUCON ポータルサイトにはパフォーマンスに問題があることが発覚。このままでは多くの人にとって不満の残る大会になってしまうだろう。あなたは XSUCON 運営チームの一人としてパフォーマンスを改善しつつ、また大会を大いに盛り上げ、選手およびオーディエンスを満足させなければならない。

課題アプリケーション仕様

課題アプリケーション XSUCON の仕様については、XSUCON アプリケーションマニュアルを参照してください。

@sorah
sorah / ffprobe.diff
Last active September 18, 2019 01:34
FFXIV Shadowbringers OST MP3 fix for iPhone & iTunes Cloud Library
--- /tmp/76.a.txt 2019-09-18 10:31:33.890300257 +0900
+++ /tmp/76.b.txt 2019-09-18 10:31:40.363523048 +0900
@@ -9,24 +9,22 @@
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
-[mp3 @ 0x556dc9468640] Estimating duration from bitrate, this may be inaccurate
-Input #0, mp3, from '../shbost/SHADOWBRINGERS_76.mp3':
+Input #0, mp3, from './SHADOWBRINGERS_76.mp3':
Metadata:
$ irb -r aws-sdk-core
/home/sorah/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.53.1/lib/seahorse/client/plugin.rb:61: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/home/sorah/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.53.1/lib/seahorse/client/plugin.rb:61: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/home/sorah/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.53.1/lib/seahorse/client/plugin.rb:61: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/home/sorah/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.53.1/lib/seahorse/client/plugin.rb:61: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/home/sorah/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.53.1/lib/seahorse/client/plugin.rb:61: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/home/s
track artist composer
夏色プレゼント あおい(CV:井口裕香)ひなた(CV:阿澄佳奈)かえで(CV:日笠陽子)ここな(CV:小倉唯) Tom-h@ck
BEAUTIFUL≒SENTENCE 内田 彩 & 原 由実 TECHNOBOYS PULCRAFT GREEN-FUND
BEAUTIFUL≒SENTENCE (Zero Answer Question) ZAQ TECHNOBOYS PULCRAFT GREEN-FUND
ウィッチ☆アクティビティ KMM団(倉石たんぽぽ(CV.井澤詩織)、飾鈴(CV.麻倉もも)、宇津木環那(CV.夏川椎菜)、目野輪冥(CV.飯田友子)、桂虎徹(CV.日岡なつみ)) TECHNOBOYS PULCRAFT GREEN-FUND
LoSe±CoNtRoL 七転福音(CV.福沙奈恵), クラリオン(CV.沼倉愛美) ZAQ & TECHNOBOYS PULCRAFT GREEN-FUND
この手が奇跡を選んでる 宮守女子高校 Ver. 宮守女子高校 [小瀬川白望 (長妻樹里), エイスリン・ウィッシュアート (水野マリコ), 鹿倉胡桃 (豊田萌絵), 臼沢塞 (佐藤利奈), 姉帯豊音 (内田真礼)] ZAQ
モがたいリめでもゆめみサマー! 丹生谷森夏 (CV.赤﨑千夏) ZAQ
Last Proof ZAQ ZAQ
PROUST EFFECT 一ノ瀬志希 (藍原ことみ) BNSI(北谷光浩)