Skip to content

Instantly share code, notes, and snippets.

View bartman's full-sized avatar
🤓
🏋️‍♂️🥩☕💻ⓒ🦀

Bart Trojanowski bartman

🤓
🏋️‍♂️🥩☕💻ⓒ🦀
View GitHub Profile
#!/bin/bash
set -e
base=$(dirname $0)
LSUSB=/usr/sbin/lsusb
FXLOAD=/sbin/fxload
declare -a rules=(
03fd:0007,03fd:0008,$base/xusbdfwu.hex
@bartman
bartman / xusbdfwu.rules
Created April 19, 2012 14:06
udev rules for xilinx usb attached jtags
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0008", MODE="666"
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xup.hex -D $tempnode"
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_emb.hex -D $tempnode"
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xlp.hex -D $tempnode"
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode"
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0015", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xse.hex -D $tempnode"
@bartman
bartman / gitconfig
Created December 12, 2012 19:15
git new-feature <branch> [ <remote> ]
[alias]
# create a new feature branch on the same remote as current branch
new-feature = "!f() { local feature=$1 remote=$2 base=$3 ; \
if [[ -z $feature ]] ; then \
echo >&2 \"git new-feature <branch> [ <remote> ] \" ; \
return 1 ; \
fi ; \
if [[ -z $remote ]] ; then \
local cur=$( git rev-parse --revs-only --symbolic-full-name HEAD ) ; \
cur=${cur#refs/heads/} ; \
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# set window split
bind-key v split-window -h
bind-key b split-window
# detach
@bartman
bartman / NOTES
Last active December 7, 2018 19:09
i3
i3-msg rename workspace abc to xyz
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
@bartman
bartman / mktags
Created March 13, 2015 13:49
mktags
#!/usr/bin/make -f
DIRS = .
IGNORE_DIRS = .svn BitKeeper CVS SCCS .hg .git
EXISTING_IGNORE_DIRS = $(wildcard ${IGNORE_DIRS})
FIND_FILTER = $(shell for d in ${EXISTING_IGNORE_DIRS} ; do echo ! -path "\"*/$$d/*\"" -a ; done)
@bartman
bartman / vimrc
Last active November 7, 2022 21:38
vimrc
" .vimrc of Bart Trojanowski
"
" You can get a more upto date version from
" http://www.jukie.net/~bart/conf/vimrc
"
" Most files sourced by this vimrc are located here:
" http://www.jukie.net/~bart/conf/vim/
" force VIMRUNTIME to a working directory, if needed
source ~/.vim/find_runtime.vim
#!/bin/bash
# 2015 (C) [email protected]
# loosly based on
# https://github.com/kepkin/dev-shell-essentials
set -e
self=$(basename $0)
fg_colors=( red green yellow blue magenta cyan )
autocolor=
@bartman
bartman / cvimrc.vim
Last active August 29, 2015 14:18
cvimrc.vim
" for examples, see:
" https://gist.github.com/RobertAudi/bededdec48e4e3eb4dde
" https://gist.github.com/calorie/cd2692a6b3f39f94f1ae
" https://github.com/haya14busa/dotfiles/blob/master/.cvimrc
let blacklists = ["https://mail.google.com/*","https://www.google.com/calendar/*","http*://news.ycombinator.com/*","http*://www.reddit.com/*","http*://*google.com/*","https://news.ycombinator.com/*","http://www.reddit.com/*","https://www.reddit.com/*"]
" maybe also... "*://*/*.pdf", "chrome://*",
" ------------------------