Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

naoya Kaneko enukane

🏠
Working from home
View GitHub Profile
@enukane
enukane / chatgpt-int.py
Last active March 2, 2023 07:19
Single conversation with ChatGPT API
View chatgpt-int.py
#!/usr/bin/env python3
import openai
import pit
import sys
openai.api_key = pit.Pit.get("openai")['api_key']
roles = ["assistant", "user"]
@enukane
enukane / lookback2022.md
Last active January 16, 2023 08:20
2022年の振り返り
View lookback2022.md

2022年の振り返り

今年消化したやりたいことリストの項目

  • HSK2級受けたい
  • 無線LAN完全自壊マニュアルvol.3だしたい
  • C100以降にサークル参加したい
  • HSK1級受けたい
View parrot-bpm.rb
#!/usr/bin/env ruby
require "optparse"
OPTS={
:bpm => 60.0,
:output => "output.gif",
}
opt = OptionParser.new
opt.on("-b BPM", "--bpm=BPM") {|v|
@enukane
enukane / dmesg.txt
Last active July 12, 2022 13:35
unifi lite6
View dmesg.txt
U6-Lite-BZ.6.0.14# dmesg
[ 0.081647] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 4.268203] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 4.268213] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 4.268224] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 4.268372] CPU1 revision is: 0001992f (MIPS 1004Kc)
[ 0.177597] Synchronize counters for CPU 1: done.
[ 4.034649] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 4.034656] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 4.034663] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
@enukane
enukane / lookback2021.md
Last active December 31, 2021 12:03
2021年の振り返り
View lookback2021.md

2021年の振り返り

lookback2021_v2

今年消化したやりたいことリストの項目達

  • スペイン語検定試験受ける (落ちた)
  • フランス語検定試験受ける (4, 5級受かった)
  • Certified Wireless Network Administrator試験受ける (受かった)
@enukane
enukane / chromium-build.sh
Created December 2, 2021 02:16
chromium build
View chromium-build.sh
#!/bin/sh
set -ex
echo "in chromium directory"
mkdir chromium && cd chromium
echo "fetch chromium"
fetch --nohooks chromium
echo "in src directory"
cd src
echo "build deps"
./build/install-build-deps.sh
@enukane
enukane / gist:1f760bda013ea4855c193d2faca785a2
Created May 28, 2021 11:12
aerohiveでhs2.0有効化できたときの関係しそうなコンフィグ
View gist:1f760bda013ea4855c193d2faca785a2
ssid glenda9-hs20-ah
ssid glenda9-hs20-ah security-object glenda9-hs20
security-object glenda9-hs20
security-object glenda9-hs20 security aaa radius-server primary 172.20.0.254
security-object glenda9-hs20 security protocol-suite wpa2-aes-8021x
interface wifi1 ssid glenda9-hs20-ah
interface wifi0 ssid glenda9-hs20-ah
@enukane
enukane / lookback2020.md
Last active January 4, 2021 13:14
2020年振り返り
View lookback2020.md

2020年の振り返り

今年消化したやりたいことリスト

の項目たち

  • Fate HF最終章みにいく
  • バ美肉やってみる (Discordでだけど)
  • 映画10本みる
  • 牛肉100%ハンバーグ自作する
@enukane
enukane / gps.sh
Created December 4, 2020 04:40
gpsd with cgps
View gps.sh
# run gpsd
/usr/local/sbin/gpsd -N -F /usr/local/var/gpsd.sock /dev/$1 &
# run cgps
cgps
@enukane
enukane / gist:e5c27e85e3df2f19ae0bffe6589e8faa
Created December 2, 2020 03:12
ntpに時刻だけ問い合わせて調整はしないやつ
View gist:e5c27e85e3df2f19ae0bffe6589e8faa
#!/bin/sh
ntpdate -d -vv -q $1