Skip to content

Instantly share code, notes, and snippets.

View fukata's full-sized avatar

fukata fukata

View GitHub Profile
@fukata
fukata / 01_how_to_write_recipe.md
Last active September 5, 2019 17:05
WebScraper ドキュメント
@fukata
fukata / init-docker-wsl
Created September 3, 2019 03:58
WSL上ではsystemdが使用不可なため対処するコード
#!/usr/bin/env bash
sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
sudo service docker start
@fukata
fukata / memo.md
Last active April 5, 2019 08:21
山梨グルメ

メモ

  • 大月おつけだんご
  • 甲府 鳥もつ煮
  • ほうとう
  • 清月のイタリアンロール
  • 清泉寮のソフトクリーム
  • 吉田うどん
  • 甲州ワインビーフ
  • 信玄生プリン
server {
listen 80;
location / {
proxy_cache images;
proxy_cache_valid 200 ${PROXY_CACHE_VALID_200};
proxy_cache_key “${DOLLAR}scheme://${DOLLAR}host${DOLLAR}request_uri${DOLLAR}is_args${DOLLAR}args”;
proxy_pass http://small_light_server;
}
# TODO ngx_small_lightがwebpファイルを処理出来ないのでそのままプロキシする。
@fukata
fukata / svd_item_similality.jq.json
Created January 17, 2019 12:28
Similar Products by PredictionIO
{
"itemScores": [
{
"item": "131",
"score": 0.9885161730935005,
"title": "どこもカオスすぎる!タイの地獄寺まとめ"
},
{
"item": "133",
"score": 0.9571745298078881,
@fukata
fukata / transform.md
Last active October 15, 2018 06:57
WebScraper - transform機能

レシピ

recipe:
  - url: 'https://fukata.org'
    steps:
      - key: title
        dom: 'html > head > title'
        action: get_text
 transform:
// parse thai style format ex) '05 ก.ย. 2536'
function parse_thai_date($str) {
$thai_months = [
'ม.ค.' => 1,
'ก.พ.' => 2,
'ม.ค.' => 3,
'เม.ย.' => 4,
'พ.ค.' => 5,
'มิ.ย.' => 6,
'ก.ค.' => 7,
@fukata
fukata / launch_terminal_fullscreen.sh
Created August 1, 2018 22:21
Launch gnome terminal fullscreen to desktop 1
#!/usr/bin/env bash
# see https://askubuntu.com/questions/374877/trying-to-launch-application-in-full-screen-mode-on-boot
/usr/bin/gnome-terminal &
sleep 5
/usr/bin/wmctrl -r 'Terminal' -t 1
/usr/bin/wmctrl -r 'Terminal' -b toggle,fullscreen
gesture swipe up 4 xdotool key alt+F1
gesture swipe left 4 _internal ws_up
gesture swipe right 4 _internal ws_down
@fukata
fukata / my.ahk
Last active June 12, 2018 03:36
My AutoHotKey Script
; HHKB style keymap
>+[::Send, {Up}
>+'::Send, {Right}
>+/::Send, {Down}
>+;::Send, {Left}
; Chrome move prev,next tab
<+![::Send, ^{PgUp}
<+!]::Send, ^{PgDn}