Skip to content

Instantly share code, notes, and snippets.

@brianc118
brianc118 / Makefile
Created May 12, 2017 00:14
MAKEFILE - ATmega324A
# Name: Makefile
# Author: Brian
DEVICE = atmega324a
CLOCK = 8000000
PROGRAMMER = -c avrispmkii
OBJECTS = main.o
FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m
# Force upload and treat the m324a as a m324pa
@brianc118
brianc118 / init.vim
Created February 17, 2018 11:53
neovim dotfile
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.local/share/nvim/plugged')
" Make sure you use single quotes
Plug 'terryma/vim-multiple-cursors'
Plug 'tpope/vim-commentary'
Plug 'scrooloose/nerdtree'

There are several approaches

  • Mount Google Drive in local Colab VM
  • Upload and download via browser
  • Use colab_util.py in python script
### Keybase proof
I hereby claim:
* I am brianc118 on github.
* I am brianc118 (https://keybase.io/brianc118) on keybase.
* I have a public key ASCq70zLyBQFjqfTeQNmCOqR6TJMrjCDgcy_Ki4e72kaCAo
To claim this, I am signing this object:
#define LEDPIN 13
#define LATCHPIN 12
volatile uint32_t i = 0;
volatile uint32_t j = 0;
volatile uint32_t tablesize = 1000;
volatile uint32_t tablesize2 = 1000;
uint8_t table[1000], table2[1000];
@brianc118
brianc118 / fish_shell_local_install.sh
Last active August 15, 2019 06:30 — forked from masih/fish_shell_local_install.sh
Installs Fish Shell without root access
#!/bin/bash
# Script for installing Fish Shell on systems without root access.
# Fish Shell will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
FISH_SHELL_VERSION=3.0.2
@brianc118
brianc118 / sox_local_install
Created August 18, 2019 03:33
Install sox 14.4.2 locally without root
#!/bin/bash
#
# USAGE: ./sox_local_install INSTALL_DIR
#
# Note. INSTALL_DIR needs to be an absolute path
INSTALL_DIR=$1
wget https://nchc.dl.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.gz
tar xvfz sox-14.4.2.tar.gz
#!/bin/bash
#
# USAGE: ./cmake_local_install INSTALL_DIR
#
# Note. INSTALL_DIR needs to be an absolute path
wget https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3.tar.gz
tar -xvzf cmake-3.15.3.tar.gz
cd cmake-3.15.3
./configure.sh --prefix=$1
@brianc118
brianc118 / caps2esc.sh
Created November 2, 2019 11:35
caps2esc
#!/bin/bash
# Ubuntu
sudo apt install libevdev-dev libudev-dev build-essential ruby curl -y
git clone git@github.com:oblitum/caps2esc.git
cd caps2esc
# git checkout 5dc8546c20ac7f0feb6ef4a8c4f53187ebef44b4
gcc caps2esc.c -o caps2esc -I/usr/include/libevdev-1.0 -levdev -ludev
sudo mv ./caps2esc /usr/local/bin/caps2esc
Error in `python': corrupted double-linked list: 0x000055d6aeea0e10 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7f5e4)[0x7f0d4cd265e4]
/lib64/libc.so.6(+0x8152d)[0x7f0d4cd2852d]
/home/Student/s4396976/miniconda2/envs/pytorch/lib/python3.7/site-packages/_torch_sox.cpython-37m-x86_64-linux-gnu.so(_ZN5torch5audio18build_flow_effectsERKSsN2at6TensorEbP16sox_signalinfo_tP18sox_encodinginfo_tPKcSt6vectorINS0_9SoxEffectESaISC_EEi+0xe74)[0x7f0c9023af84]
/home/Student/s4396976/miniconda2/envs/pytorch/lib/python3.7/site-packages/_torch_sox.cpython-37m-x86_64-linux-gnu.so(+0x60fc8)[0x7f0c90263fc8]
/home/Student/s4396976/miniconda2/envs/pytorch/lib/python3.7/site-packages/_torch_sox.cpython-37m-x86_64-linux-gnu.so(+0x5910f)[0x7f0c9025c10f]
python(_PyMethodDef_RawFastCallKeywords+0x264)[0x55d2c20f36e4]
python(_PyCFunction_FastCallKeywords+0x21)[0x55d2c20f3801]
python(_PyEval_EvalFrameDefault+0x4e8c)[0x55d2c214f2bc]