Skip to content

Instantly share code, notes, and snippets.

View fetus-hina's full-sized avatar
💭
I may be slow to respond.

AIZAWA Hina fetus-hina

💭
I may be slow to respond.
View GitHub Profile
{
"rule": {
"key": "turf_war",
"name": "ナワバリバトル",
"multiline_name": "ナワバリ\nバトル"
},
"type": "regular",
"stage": {
"id": "109",
"name": "あしたはデンデン",
@fetus-hina
fetus-hina / query.sql
Created June 11, 2019 18:48
野良 X ブキ集計
-- https://twitter.com/fetus_hina/status/1138514672494080000
SELECT
MAX(c2.key) AS weapon_key,
MAX(c2.name) AS weapon_name_en,
COUNT(*) AS players_count,
SUM(CASE WHEN battle2.is_win = battle_player2.is_my_team THEN 1 ELSE 0 END) AS win_count,
(100.0 * SUM(CASE WHEN battle2.is_win = battle_player2.is_my_team THEN 1 ELSE 0 END)::float / COUNT(*)::float)::decimal(5,2) AS win_pct,
AVG(battle_player2.kill)::decimal(4,2) AS avg_kill,
AVG(battle_player2.death)::decimal(4,2) AS avg_death,
@fetus-hina
fetus-hina / prog.php
Last active April 17, 2019 08:43
PHPで和暦表示
<?php
// ICU version => 62.1
// ICU Data version => 62.1
// ICU TZData version => 2018e
// ICU Unicode version => 11.0
declare(strict_types=1);
$tz = new DateTimeZone('Asia/Tokyo');
@fetus-hina
fetus-hina / counts.csv
Last active June 5, 2018 12:12
ガチマッチ(野良)ランク S, S+, X、カウント別
We can't make this file beautiful and searchable because it's too large.
rule,stage,cnt_win,cnt_lose,battles,total_secs,battles_overtime
area,battera,62,61,1,304,1
area,battera,64,63,1,310,1
area,battera,65,60,1,300,0
area,battera,66,55,1,300,0
area,battera,66,63,1,300,0
area,battera,66,65,2,610,2
area,battera,66,65,1,315,1
area,battera,67,62,1,300,0
area,battera,68,67,1,306,1
@fetus-hina
fetus-hina / tlstest.py
Last active April 6, 2018 13:46
TLS Test
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import ssl
def http_get(url):
try:
requests.get(site["url"], verify=True)
return "OK"
@fetus-hina
fetus-hina / clam_blitz.sql
Created December 13, 2017 13:06
ガチアサリ救済
-- stat.ink 管理用 SQL
-- ガチアサリを知らないクライアントで、イカリング2のJSONをそのまま送ってくれるやつの場合に
-- JSONの内容を検査してガチアサリと設定するための SQL
-- rule_id = 5 : ガチアサリの ID をハードコード
-- "battle2"."created_at" >= '2017-12-13T11:00:00+09:00' : ver 2.1.0 リリース日時(ガチアサリは絶対これ以降)
-- "battle2"."id" >= 243190 : 上の日時フィルタの具体的な最小ID(本来どちらかでいい。明示的に&インデックス用)
UPDATE "battle2"
@fetus-hina
fetus-hina / data.csv
Last active August 15, 2017 06:28
special used vs win %
weapon rule special battles win sub_weapon special_weapon
Splattershot Turf War 0 39 13 Burst Bomb Splashdown
Splattershot Turf War 1 110 50 Burst Bomb Splashdown
Splattershot Turf War 2 58 31 Burst Bomb Splashdown
Splattershot Turf War 3 23 18 Burst Bomb Splashdown
Splattershot Turf War 4 6 4 Burst Bomb Splashdown
Splattershot Splat Zones 0 17 6 Burst Bomb Splashdown
Splattershot Splat Zones 1 48 25 Burst Bomb Splashdown
Splattershot Splat Zones 2 29 14 Burst Bomb Splashdown
Splattershot Splat Zones 3 16 6 Burst Bomb Splashdown
@fetus-hina
fetus-hina / mantis-password-md5.diff
Created March 9, 2017 13:16
Use password_hash() instead of md5() when create/authenticate user on MantisBT system
diff -r -u mantisbt.o/core/authentication_api.php mantisbt/core/authentication_api.php
--- mantisbt.o/core/authentication_api.php 2017-03-09 21:53:03.000000000 +0900
+++ mantisbt/core/authentication_api.php 2017-03-09 22:11:34.708292246 +0900
@@ -209,7 +209,7 @@
if( $t_auto_create ) {
# attempt to create the user
- $t_cookie_string = user_create( $p_username, md5( $p_password ) );
+ $t_cookie_string = user_create( $p_username, $p_password );
if( $t_cookie_string === false ) {
int div2(int a) {
return a / 2;
}
int div3(int a) {
return a / 3;
}
int div4(int a) {
return a / 4;
アオリチーム |ホタルチーム
=============================|==============================
rasta$タット はやと
ひとりでできないもん なつの
よぞらにかがやくほし           
りお Tflc*かすたーど
FDJけんちゃん そうし
最強破壊神悪魔?英雄 ちびゴリラ
つぶがい ラストいっくーん
?さま ブリぐいのすけ