Skip to content

Instantly share code, notes, and snippets.

Avatar

Tatsuya Fukata fukata

View GitHub Profile
@fukata
fukata / 01_how_to_write_recipe.md
Last active Sep 5, 2019
WebScraper ドキュメント
View 01_how_to_write_recipe.md
@fukata
fukata / init-docker-wsl
Created Sep 3, 2019
WSL上ではsystemdが使用不可なため対処するコード
View init-docker-wsl
#!/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 Apr 5, 2019
山梨グルメ
View memo.md

メモ

  • 大月おつけだんご
  • 甲府 鳥もつ煮
  • ほうとう
  • 清月のイタリアンロール
  • 清泉寮のソフトクリーム
  • 吉田うどん
  • 甲州ワインビーフ
  • 信玄生プリン
View nginx.conf.template
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 Jan 17, 2019
Similar Products by PredictionIO
View svd_item_similality.jq.json
{
"itemScores": [
{
"item": "131",
"score": 0.9885161730935005,
"title": "どこもカオスすぎる!タイの地獄寺まとめ"
},
{
"item": "133",
"score": 0.9571745298078881,
@fukata
fukata / transform.md
Last active Oct 15, 2018
WebScraper - transform機能
View transform.md

レシピ

recipe:
  - url: 'https://fukata.org'
    steps:
      - key: title
        dom: 'html > head > title'
        action: get_text
        transform:
View parse_thai_date.php
// 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 Aug 1, 2018
Launch gnome terminal fullscreen to desktop 1
View launch_terminal_fullscreen.sh
#!/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
View libinput-gestures.conf
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 Jun 12, 2018
My AutoHotKey Script
View my.ahk
; HHKB style keymap
>+[::Send, {Up}
>+'::Send, {Right}
>+/::Send, {Down}
>+;::Send, {Left}
; Chrome move prev,next tab
<+![::Send, ^{PgUp}
<+!]::Send, ^{PgDn}
You can’t perform that action at this time.