Skip to content

Instantly share code, notes, and snippets.

View lae's full-sized avatar

只今立ち去った存在です lae

View GitHub Profile
@lae
lae / sif.sh
Last active August 12, 2020 09:35
~]$ sif_login=
~]$ sif_passwd=
~]$ sif_device=
~]$ sif_host=
~]$ sif_hmac=
~]$ sifcall() { [ ! -z "$2" ] && _sif_hash=$(printf "$2" | sha1hmac -K $sif_hmac - | awk '{print $1}'); curl -s -w'\n' -XPOST http://$sif_host/main.php/$1 -H 'Client-Version: ' -H 'API-Model: straightforward' -H "Authorize: consumerKey=lovelive_test&timeStamp=$(date +%s)&version=1.1&nonce=$sif_nonce$([ -z "$sif_token" ] || printf \&token=$sif_token)" -H "User-ID: ${sif_uid:-0}" -H "X-Message-Code: ${_sif_hash:-0}" $([ ! -z "$2" ] && printf -- "-F request_data=")$2; unset _sif_hash; let sif_nonce=$((sif_nonce+1)); }
~]$ siflogin() { _sif_response=$(sifcall login/login '{"login_key":"'$sif_login'","login_passwd":"'$sif_passwd'","devtoken":"'$sif_device'"}'); sif_token=$(printf "$_sif_response" | jq -r '.response_data.authorize_token'); sif_uid=$(printf "$_sif_response" | jq -r '.response_data.user_id'); unset _sif_response; let sif_nonce++; }
~]$ sifstart() { sif_nonce=1; sif_token=$(sifcall login/authkey | jq -r '.response_data.authoriz
[lae@haruka ~]$ mtr -wc 2 !$
mtr -wc 2 starlight.lae.is
Start: Tue Jun 28 20:13:19 2016
HOST: haruka Loss% Snt Last Avg Best Wrst StDev
1.|-- gateway 0.0% 2 0.6 0.4 0.3 0.6 0.0
2.|-- 192.168.171.1 0.0% 2 0.4 0.5 0.4 0.6 0.0
3.|-- 96.120.89.189 0.0% 2 11.3 10.8 10.4 11.3 0.0
4.|-- te-0-1-0-14-sur03.sanjose.ca.sfba.comcast.net 0.0% 2 13.0 11.1 9.2 13.0 2.6
5.|-- hu-0-18-0-5-ar01.santaclara.ca.sfba.comcast.net 0.0% 2 13.8 13.5 13.2 13.8 0.0
6.|-- be-33651-cr01.sunnyvale.ca.ibone.comcast.net 0.0% 2 15.6 15.5 15.4 15.6 0.0
# Collect all down/incomplete PGs and create "inventory" files for playbook_remove_pg.yml per PG (separated by empty lines)
ceph health detail |
grep -P "is (down\+)?incomplete, acting" |
cut -d' ' -f2 |
while read pg
do
ceph pg $pg query |
jq -r '.recovery_state[0].probing_osds[]' |
while read osd
do
Start: Wed Nov 23 10:34:49 2016
HOST: haruka Loss% Snt Last Avg Best Wrst StDev
1.|-- 192.168.173.1 0.0% 20 0.4 0.3 0.2 0.5 0.0
2.|-- 192.168.171.1 0.0% 20 0.5 0.7 0.5 1.2 0.0
3.|-- 96.120.89.189 20.0% 20 1546. 6449. 121.4 10902 3811.4
4.|-- 162.151.30.65 25.0% 20 1456. 6603. 186.6 10797 3787.1
5.|-- 162.151.78.249 30.0% 20 1365. 7017. 737.5 10697 3388.8
6.|-- 68.86.90.93 90.0% 20 7557. 8040. 7557. 8524. 684.0
7.|-- 68.86.89.230 20.0% 20 1184. 6745. 774.7 10476 3151.8
8.|-- 23.30.206.102 20.0% 20 1158. 6656. 715.6 10364 3125.0
extern crate scoped_pool;
use std::{env, process, fs};
use std::io::prelude::*;
use std::fs::File;
use std::path::Path;
use std::error::Error;
use scoped_pool::Pool;
extern crate rusqlite;
use rusqlite::Connection;
#[derive(Debug, Copy, Clone)]
enum Trigger {
Note,
Combo,
Perfect,
Missing
127.0.0.1 localhost
127.0.1.1 host-one.example.invalid host-one
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# BEGIN ANSIBLE MANAGED: Proxmox Cluster Hosts
10.100.100.101 host-one.example.invalid host-one
10.100.100.102 host-three.example.invalid host-two
#!/usr/bin/python
import requests
import re
import sys
from collections import Counter
if len(sys.argv) < 2:
sys.exit("usage: python {} player-id".format(sys.argv[0]))
ranking_pl = requests.get("http://arcturus.su/tenhou/ranking/ranking.pl?name={}".format(sys.argv[1]))
@lae
lae / monacoin.txt
Last active April 2, 2017 08:42
[ANN][MONA] Monacoin LAUNCHING 2014/01/01 0:00 GMT
[center][img]http://i.imgur.com/HcUPhE3.png[/img]
[size=15pt]http://monacoin.org/en/[/size]
[b][color=blue][size=15pt]Specifications[/size][/color][/b]
Algorithm: Lyra2REv2 (originally Scrypt until block 450000)
Premine: none
Block reward: 50 MONA
Block time: 1.5 minutes
Retarget: 1 block (Dark Gravity Wave algorithm, hard fork at block 450000)