Skip to content

Instantly share code, notes, and snippets.

View JasonTam's full-sized avatar
🍣
⊂(´・◡・⊂ )∘˚˳°

Jason Tam JasonTam

🍣
⊂(´・◡・⊂ )∘˚˳°
View GitHub Profile
@JasonTam
JasonTam / update-drop-alt-firmware.md
Created March 1, 2024 03:06
writing firmware to drop alt keyboard (new firmwares persists on smarteeprom)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JasonTam
JasonTam / samson_co1u_linux.md
Last active April 28, 2021 02:50
Samson C01U microphone remap hack

The SAMSON CO1U microphone uses a stereo chip where the left channel should be the final output. However, on linux, we see the post-proc(left) and raw(right) signals separately. To fix this, we can map the left channel to both channels reducing to a proper mono channel. (Compare to setting a mono signal on pavucontrol which gives a screwed up noisy signal).

Add the following line to /etc/pulse/default.pa (or whichever file is being used -- see http://manpages.ubuntu.com/manpages/bionic/man5/default.pa.5.html )

# SAMSON CO1U HACK
.nofail
load-module module-remap-source source_name=samson-co1u-hack master=alsa_input.usb-Samson_Technologies_Samson_C01U-00.analog-stereo master_channel_map=left,left channel_map=left,right remix=false
.fail

Keybase proof

I hereby claim:

  • I am jasontam on github.
  • I am 2jason (https://keybase.io/2jason) on keybase.
  • I have a public key ASAVFB01e4rov6NA7NL5qxYx8gmaM_wqZ_Majqzg77nLmgo

To claim this, I am signing this object:

@JasonTam
JasonTam / vw_install_notes.md
Created October 8, 2019 17:33
this is the simplest way i found to install vowpal wabbit on ubuntu conda

clone down the vw repo git clone --recursive https://github.com/VowpalWabbit/vowpal_wabbit.git

Modify ./python/vowpalwabbit/conda_install.sh change the last line to install from pip pip install vowpalwabbit

And chmod u+x the file

conda create -n superset python=3.6
conda activate superset
sudo apt-get install build-essential libssl-dev libffi-dev libsasl2-dev libldap2-dev
pip install superset
pip uninstall pandas
pip install pandas==0.23.4
pip uninstall sqlalchemy
pip install sqlalchemy==1.2
@JasonTam
JasonTam / zappa_setup
Last active May 15, 2019 04:39
zappa pipenv
pipenv --python 3.6
pipenv install
zappa init
zappa deploy
#zappa update
# fucking lambda has an old libstdc++ I think, so compile any cpython stuff with GCC/G++-5
https://archerfmy.github.io/2017/04/12/How-to-switch-your-gcc-g-version-in-ubuntu/
sudo apt-get install gcc-5 g++-5
@JasonTam
JasonTam / fix_CXXABI_1.3.9
Created May 14, 2019 18:57
CXXABI_1.3.9 deployment fixes lambda etc
(base) ➜ lib mv libstdc++.so.6 libstdc++.so.6.bak
(base) ➜ lib mv libstdc++.so libstdc++.so.bak
(base) ➜ lib ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6
Make sure this is done in the lib of the env you are deploying with
/home/jason/anaconda3/envs/py36/lib
or
/home/jason/anaconda3/lib
["b1", "b2", "b3", "b4", "b5", "b6"]