Skip to content

Instantly share code, notes, and snippets.

View Goryudyuma's full-sized avatar
🏇

Goryudyuma(Kei.Matsumoto) Goryudyuma

🏇
View GitHub Profile
class Main {
public static void main(String... args) {
assert new QuestionList().toJson().equals("[]");
}
}
class QuestionList {
public QuestionList() {
}
@mbleigh
mbleigh / README.md
Last active September 25, 2020 04:26
Automate the deletion of old Firebase Hosting versions.

Firebase Hosting Version Cleanup

This is a simple utility script for cleaning up Firebase Hosting versions, leaving a specified number of versions remaining. This is primarily done to conserve storage usage, but may have other uses.

USE AT YOUR OWN RISK. NO WARRANTY IS PROVIDED. THIS SCRIPT DOES DELETE STUFF PERMANENTLY

Usage

node cleanupVersions.js [commit]

@south37
south37 / 00_timeline.md
Last active May 3, 2024 17:19
ISUCON Cheat Sheet
#include <iostream>
#include <vector>
#include <map>
using namespace std;
struct Node {
map<char, int> next; // nodeの両端にcharをつけたときにいくnodeのindex
int len = 0; // 回文の長さ
int sufflink = 0; // nodeのsuffix palindromeであるnodeのindex
@ugwis
ugwis / hubeny_distance.js
Created December 30, 2015 06:03
distance between two points
/* ヒュベニの公式より世界測地系1984(WGS84)での二点間距離を算出します */
/* http://yamadarake.jp/trdi/report000001.htmlを基に作成 */
function calc_len(lat1,lon1,lat2,lon2){
// 角度をラジアンに
lat1 = lat1/180*Math.PI;
lat2 = lat2/180*Math.PI;
lon1 = lon1/180*Math.PI;
lon2 = lon2/180*Math.PI;
// 長半径(赤道半径)
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
''=~(('(').((''=='').''^'.'^'^'^'~').('='^(''=='').''^'^'^')').('.'^(''=='').''^'='^'('^')').(')'^'('^'^'^'~').('('^')'^'.').('~'^(''=='').''^')'^'.'^'=').('='^'('^')'^(''=='').''^'~').((''=='').''^'='^'~').(')'^'.'^'(').(')'^'('^'='^'^').('('^(''=='').''^'.'^'^').(')'^(''=='').''^'('^'^').('.'^')'^'(').('^'^'.').('^'^'='^'('^'.').('~'^'='^(''=='').'').(')'^'~'^'='^'('^'.').('.'^(''=='').''^'='^'(').((''=='').''^'~'^'.'^')'^'=').((''=='').''^'('^'~'^'='^')').('('^'.'^'='^'^').('^'^'~').('('^'='^')'^(''=='').''^'~').((''=='').''^'('^'.'^'='^'~').('='^(''=='').''^'~').('.'^(''=='').''^'('^'^').('='^'^').('('^(''=='').''^'~'^'.'^'=').('.'^'('^'=').('='^'.'^'('^(''=='').'').('~'^'.'^'='^(''=='').''^')').('('^(''=='').''^')'^'~'^'=').('('^'^'^'.'^'=').('^'^'~').(')'^'^').((''=='').''^'~'^'.').((''=='').''^'='^'~').((''=='').''^'^'^')'^'(').('.'^(''=='').''^'('^'^').('('^(''=='').''^')'^'^').((''=='').''^'('^'~').('='^(''=='').''^'~'^')'^'(').('('^'.'^'=').('('^(''=='').''^'='^'.').((''=='').''^'='^'.'^'(').('~'^')