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
# include following in .bashrc / .bash_profile / .zshrc | |
# usage | |
# $ mkvenv myvirtualenv # creates venv under ~/.venv/ | |
# $ venv myvirtualenv # activates venv | |
# $ deactivate # deactivates venv | |
# $ rmvenv myvirtualenv # removes venv | |
export VENV_HOME="$HOME/.venv" | |
[[ -d $VENV_HOME ]] || mkdir $VENV_HOME |
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
#!/usr/bin/bash | |
echo "Checking the bus for any Nvidia cards.." | |
if lspci | grep NVIDIA | |
then | |
echo "Nvidia GPU detected!" | |
echo "Switching to Nvidia..." | |
if pacman -Qe | grep mesa-libgl | |
then | |
yes | pacman -S nvidia-libgl lib32-nvidia-libgl |
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
ac97-powersave.conf | |
auto-hibernate.conf | |
--- /etc/laptop-mode/conf.d/auto-hibernate.conf 2014-09-07 13:38:23.000000000 -0500 | |
+++ auto-hibernate.conf 2013-09-25 21:09:36.603610468 -0500 | |
@@ -8,21 +8,21 @@ | |
# Auto-hibernation settings | |
# ------------------------- | |
# | |
-#__COMMENT Using these settings, you can make laptop mode tools automatically put your | |
-#__COMMENT computer into hibernation when the battery level goes critically low. |
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
# ------------------------------------------------------------------------------ | |
# tlp - Parameters for power save | |
# Hint: some features are disabled by default, remove the leading # to enable | |
# them. | |
# Set to 0 to disable, 1 to enable TLP. | |
TLP_ENABLE=1 | |
# Seconds laptop mode has to wait after the disk goes idle before doing a sync. |
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
#!/usr/bin/bash | |
xconfig="/etc/X11/xorg.conf" | |
if [ -e "$xconfig" ] | |
then | |
echo "Nvidia xconfig detected" | |
echo "Switching to mesa..." | |
sudo pacman -S lib32-mesa-libgl mesa-libgl | |
sudo rm $xconfig | |
else |
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
// ==UserScript== | |
// @name Regex Crossword Debugger | |
// @namespace http://www.kunxi.org/ | |
// @version 0.2 | |
// @description Check the answers and mark the mismatched regex. | |
// @author Kun Xi | |
// @match https://regexcrossword.com/playerpuzzles/* | |
// @match https://regexcrossword.com/challenges/* | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js |
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
// ==UserScript== | |
// @name Regex Crossword Debugger | |
// @namespace http://www.kunxi.org/ | |
// @version 0.1 | |
// @description Check the answers and mark the mismatched regex. | |
// @author Kun Xi | |
// @match http://regexcrossword.com/playerpuzzles/* | |
// @match http://regexcrossword.com/challenges/* | |
// @require //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js |