Skip to content

Instantly share code, notes, and snippets.

:443 {
proxy /v1 https://api.native-instruments.com/
proxy /static https://api.native-instruments.com/
log log.txt
}
# sudo setcap cap_net_bind_service=+ep /usr/local/bin/caddy
# /etc/hosts
# 127.0.0.1 api.native-instruments.coz
@ohac
ohac / ssss.go
Last active October 11, 2018 08:59
/*
* ssss version 0.5 - Copyright 2005,2006 B. Poettering
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@ohac
ohac / csv.rb
Created September 23, 2018 00:00
#!/usr/bin/env ruby
wtbl = nil
colors = [31,32,33,34,35,36,37]
begin
while line = STDIN.readline do
line.chomp!
csv = line.split(",")
wtbl_new = csv.map do |v|
v.size
end
@ohac
ohac / .gitignore
Last active August 23, 2020 20:02
get file ID from Panasonic Lumix DMC-GX8
result.xml
tmp.xml
tmp2.txt
*.jpg
*.mp4
*.ts
@ohac
ohac / run.sh
Created June 29, 2018 07:56
PulseAudio sound detector
#!/bin/bash
while true; do
pamon | ./a.out ; notify-send "$(date)"
sleep 2
done
@ohac
ohac / rec_radiko.sh
Created May 6, 2018 09:14 — forked from matchy256/rec_radiko.sh
簡易Radiko録音スクリプト
#!/bin/bash
set -x
set -e
#pid=$$
pid="1" # TODO
date=`date '+%Y-%m-%d-%H_%M'`
playerurl=http://radiko.jp/apps/js/flash/myplayer-release.swf
playerfile="player.swf"
keyfile="authkey.png"
(()=>{
var a = document.createElement('A');
a.download='foo-'+(new Date()).toISOString()+'.txt';
a.href='data:text/plain,foo';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
})();
class foo {
public:
foo* operator>>(const char* str) { return (foo*)0; }
};
#define cout void x(){foo a;a
#define return0 ;}
int main() { return 0; }
/*
$ cat boku.cpp
setting.json
zaif/
coincheck/
bitbank/
@ohac
ohac / .gitignore
Last active October 31, 2017 13:54
worker_all.js
foo.html
foo.js
foo.wasm