View config.fish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function l | |
ls | |
end | |
set -x PATH /Users/clemente/.cargo/bin /usr/local/bin $PATH | |
pyenv init - | source | |
function show_git_branch | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' |
View install_pyenv.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash -c 'CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 3.7.4' |
View parse_wikipedia_xml.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open("./wikipedia_articles_text") as f: | |
article_text = f.read() | |
articles = article_text.split("</doc>") | |
documents = [] | |
for i, article in enumerate(articles): | |
lines = article.split("\n") | |
if i == 0: | |
title = lines[1] | |
text = "\n".join(lines[3:]) |
View 40-libinput.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "InputClass" | |
Identifier "touchpad" | |
Driver "libinput" | |
Option "Name" "ELECOM TrackBall Mouse HUGE TrackBall" | |
# Normal Mapping | |
Option "ButtonMapping" "3 2 2 4 5 6 7 1 1 10 11 12 13 14 15 16" | |
# FPS Mapping | |
#Option "ButtonMapping" "1 2 3 4 5 6 7 1 3 10 11 12 13 14 15 16" | |
EndSection |
View default_env.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=$(getconf PATH) |
View parse_wiki_files.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from os import path | |
def parse_wiki_file(output_location, filename): | |
with open(filename) as f: | |
txt = f.read() | |
docs = txt.split("</doc>") | |
split_by_line = [doc.split("\n") for doc in docs] | |
with_title = [{"title": docs[0][1], "body": "\n".join(docs[0][3:])}] + [{ |
View get_host_from_ip.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
nmblookup -A $1 |
View wiki_separated.awk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# articles look like: | |
# Title | |
# Article text... | |
# .... | |
# ===== | |
# FS="\n", set the field separator to be newlines, used to get the title (which will be $2) | |
# RS="=====" set the record separtor to be five equal signs | |
# gsub("/", "_", $2): replace all forward slashes with underscores in the title line, needed so that we don't upset anyone | |
# if statement checks to see if there is already a file with the title we're looking at |
View 70-synaptics.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "InputClass" | |
Identifier "touchpad catchall" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
Option "TapButton1" "1" | |
Option "FingerLow" "29" | |
Option "FingerHigh" "34" | |
Option "FingerPress" "73" | |
Option "HorizTwoFingerScroll" "1" | |
Option "TapButton2" "3" |
View get_host_ip.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hostname="" | |
avahi-browse _ssh._tcp -r -t | awk "c&&c--;/$HOSTNAME/{c=2}" | grep 'address' |
NewerOlder