Skip to content

Instantly share code, notes, and snippets.

@osakanataro
osakanataro / gist:5ee1b6dfa3d1f12f8c2b4492b1676aa8
Created August 13, 2021 11:27
twitter spaceの取得方法
twitter spaceの取得方法
まず、twitterの普通のAPIで「https://twitter.com/i/spaces/<spaceID>」を取得
https://twitter.com/i/api/graphql/FJoTSHMVF7fMhGLc2t9cog/AudioSpaceById
にGETアクセスしてJSONレスポンスを取得
パラメータ
variables={
"id":"<spaceID>",
@osakanataro
osakanataro / gist:97b52d7417f00a5e8f23e742c5990669
Created July 28, 2021 16:08
ASUS E203NA Ubuntu 20.04 dmesg
ubuntu@ubuntu:~$ dmesg
[ 0.000000] microcode: microcode updated early to revision 0x40, date = 2020-02-27
[ 0.000000] Linux version 5.8.0-43-generic (buildd@lcy01-amd64-018) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #49~20.04.1-Ubuntu SMP Fri Feb 5 09:57:56 UTC 2021 (Ubuntu 5.8.0-43.49~20.04.1-generic 5.8.18)
[ 0.000000] Command line: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] zhaoxin Shanghai
@osakanataro
osakanataro / gist:219cf6aca70a4ffec4656aae30a299b9
Created July 28, 2021 16:05
ASUS E203NA Ubuntu 20.04 lspci
ubuntu@ubuntu:~$ lspci -v
00:00.0 Host bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Host Bridge (rev 0b)
Subsystem: ASUSTeK Computer Inc. Celeron N3350/Pentium N4200/Atom E3900 Series Host Bridge
Flags: bus master, fast devsel, latency 0
00:00.1 Signal processing controller: Intel Corporation Device 5a8c (rev 0b)
Subsystem: ASUSTeK Computer Inc. Device 1980
Flags: bus master, fast devsel, latency 0, IRQ 24
Memory at 91310000 (64-bit, non-prefetchable) [size=32K]
Capabilities: <access denied>
$storyurl="https://peep.jp/stories/hhJMikB1Hr3Ni4Hs"
$apistoryurl="https://api.peep.jp/web_api/v1/stories/"
$apichapterurl="https://api.peep.jp/web_api/v1/chapters/"
$storyuuid=$storyurl.Substring($storyurl.LastIndexOf("/")+1)
$storyjsonurl=$apistoryurl+$storyuuid
$storyresponse=Invoke-RestMethod $storyjsonurl
Write-Host $storyresponse.story.title
@osakanataro
osakanataro / gist:a9ba5ded340070b8e6abc28969d7ae4f
Created May 17, 2021 14:32
openWRTでV6プラス/BIGLOBEに接続するためのスクリプト
#units=63
units=15
IP4='xxx.xxx.xxx.xxx'
#PSID='6e'
#PSID='110'
PSID=110
LANDEV='br-lan'
WAN6DEV='eth0'
TUNDEV='map-MAP'
dd if=../majo-magical-J1618B/AB565.bin of=F640x48x80.bin bs=4915200 count=1
dd if=../majo-magical-J1618B/AB565.bin of=F128x128x282.bin skip=4915200 bs=1
split -b 61440 -a 3 -d F640x48x80.bin a
split -b 32768 -a 3 F128x128x282.bin b
mkdir data
for file in a[0-9][0-9][0-9]
do
ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 640x48 -i $file -vcodec bmp data/$file.bmp
osakanataro@ubuntuserver:~/majo$ sudo fdisk -l /dev/sdb
ディスク /dev/sdb: 1.9 GiB, 1977614336 バイト, 3862528 セクタ
単位: セクタ (1 * 512 = 512 バイト)
セクタサイズ (論理 / 物理): 512 バイト / 512 バイト
I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト
ディスクラベルのタイプ: dos
ディスク識別子: 0x00000000
デバイス 起動 開始位置 最後から セクタ サイズ Id タイプ
/dev/sdb1 135 3862527 3862393 1.9G 6 FAT16
chronos@localhost ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 3/3
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0