Skip to content

Instantly share code, notes, and snippets.

View numpad0's full-sized avatar

numpad0

View GitHub Profile
Often, a duplicate set of either platforms or tracks are needed, because people demand frequent and bi-directional train services:
____▢▢▢> /―――――――――――――――――――――▢▢▢>――――――――――――――― Cityline Eastbound
――<▢▢▢―――< [Riverton] >――――――――――――< [Citycore Sta.] [Findist Sta.]
 ̄ ̄ ̄ ̄ ̄ \―――――<▢▢▢―――――――――――――――――――<▢▢▢―――――― Cityline Westbound
and tracks need regular maintainance, for which sections and lines has to be closed or capacity significantly reduced:
Trolley line ――――――――――▢▢▢▢▢▢>―――――X ඎ ―― ඎ // ඣ X―――――――――――――― Red line
\ [Michael J. Sandel Stadium] / ̄ ̄ ̄ ̄ University North line
#!/bin/python3
import os
import subprocess
# #!/bin/bash
# ffmpeg -y -i input_video_file.mp4 -an -ss 00:59:59 -t 00:10:00 -vcodec copy int1.mp4
# ffmpeg -y -i int1.mp4 -an -filter:v "crop=1920:75:0:20" -r 6 int2.mp4
# ffmpeg -y -i int2.mp4 -f lavfi -i color=cccccc:s=1920x75 -f lavfi -i color=black:s=1920x75 -f lavfi -i color=white:s=1920x75 -lavfi threshold int3.mp4
# mkdir -p ~/h3_telemetry/{alt,vel,time,joined}
@numpad0
numpad0 / gist:045189c4a43f0d07ae31a9f068f30a92
Created August 20, 2020 12:30
Better TweetDeck custom CSS
/* Ref: */
/* https://plaza.rakuten.co.jp/niarufang/diary/201810040000/ */
/* http://www.luty.sakura.ne.jp/computer.php?id=12 */
::-webkit-scrollbar, .column, .stream-item, .app-columns-container, .column-header, .scroll-conversation, .flex-column, .column-holder
{
background-color: rgba(0, 0, 0, .2) !important;
}
.app-columns{

WSL2 + X410 + PulseAudio備忘録

目的

Windows 10上のWSL2でFirefox開いてYouTube見られるくらいまで持ってく。

免責

早くも記憶が薄れているので……

既知の問題点

  • Windowsを起動するごとに言語設定にUSキーボードが勝手に入る
@numpad0
numpad0 / Realtek_RX2.ino
Last active March 9, 2019 17:03
Combined version of https://github.com/monsieurDavid/rx2-hacks and https://github.com/dimircea/RX2-TX2-RC and a midnight hour with an oscilloscope
/**
* Control Realtek RX2 (RX2 -G) RC Receiver with Arduino
*
* @author Mircea Diaconescu, Octomber 28, 2013
* @source https://github.com/dimircea/
* GPL v3 License
*
* Many cheap RC toys are based on TX2 / RX2 transmitter / receiver ICs.
* This Arduino sketch allows to replace the TX2 based Remote Control with Arduino.
* Just one single pin is used from the Arduino board.
@numpad0
numpad0 / Configuration.h
Last active January 11, 2019 06:51
Conf for my custom Tronxy X1/Melzi 2.0. Tested, but had to change heater control to PID with P gain = 12. Changed build volume, Z step size and added extruder pin definition. Fork from https://github.com/dennistimmermann/tronxy-x1_repetier
/*
This file is part of Repetier-Firmware.
Repetier-Firmware 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 3 of the License, or
(at your option) any later version.
Repetier-Firmware is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@numpad0
numpad0 / Configuration.h
Created October 14, 2018 07:17
Tronxy X1 config for Repetier-Firmware-2018-10-13(not yet confirmed working)
/*
This file is part of Repetier-Firmware.
Repetier-Firmware 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 3 of the License, or
(at your option) any later version.
Repetier-Firmware is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@numpad0
numpad0 / gist:e8eec795e3ca1c1f6ffc3583028ce1ae
Created March 12, 2018 14:10
BlackBean Control commands
# Panasonic HK9480 Ch1
lights_brighter = 260056007437110c100d10291029110c1029110c100d100c1129100c110c1029110c1029110c1029100d100c1129100c110c100d100c110c1029110c1029110c1029110c100c11291029110c100c110c1029110c100d10000d050000
lights_cooler = 260056007437110c110c10291128110c1128110c110c100c1129100c110c1029110c1029110c1029110c100c112910291128110c110c100c110c100d100c1128110c110c10291128110c110c1029110c1029110c102911000d050000
lights_warmer = 260056007239100d0e0f0f2a0f2a100d0e2b100a110e100d0f2a100d0f0e0f2a0f0e0f2a0f0e0f2a0f0e0f0d0f2a11290f2a100d0f0d102a0f0b120a120e0f2a0f0e0f0b122a0f0d100d0f0d102a0f0b122a0f0d102a0f000d050000
lights_full = 2600560072390e0f0e0e0f2b0e2b0e0f0e2b0e0f0e0e0f0e0e2b0e0f0e0f0e2b0e0e0f2b0e0e0f2b0e0e0f0e0e2b0f0e0e0f0e0e0f0e0e0f0e0e0f2b0e2b0e0f0e2b0e0f0e0e0e2b0f0e0e2b0f0e0e0f0e2b0e0f0e0e0f000d050000
lights_darker = 260056007437110c110b11291029110c1029110c100c110c1128110c110c1029110c1029110b1129100c110c1128110c110c100c110c11281129100c1129100c1128110c110c100c1129100c110c110c1029110c100c11000d050
@numpad0
numpad0 / SerialGamepad.ino
Last active December 13, 2017 01:58
SerialGamepad
// SerialGamepad: Takes serial input to set Joystick status
// for easy gamepad input on various platforms
// Command syntax:
// b0000000000000000 set buttons 1-16 to on or off
// a0128 0128 0128 set axes 0-2 to respective values, 0-1023
// Target:
// Arduino Leonardo, Micro, and compatible boards
#!/bin/sh
json=$(wget http://himawari8-dl.nict.go.jp/himawari8/img/D531106/latest.json -O - )
url=$(echo "$json" | sed -e s/^.........// -e 's/\".*$//' -e s/-/'\/'/g -e s/\ /'\/'/g -e s/://g)
base="http://himawari8-dl.nict.go.jp/himawari8/img/D531106/1d/550/"
suff="_0_0.png"