Skip to content

Instantly share code, notes, and snippets.

@qguv
qguv / intermediate git.md
Created Jun 5, 2014
an introduction beyond the basic commit workflow
View intermediate git.md

INTERMEDIATE GIT

git v2.0.0

documentation

$ cd ~/Desktop

  • git help branch
  • man git
  • not man git branch
@qguv
qguv / internet_uccs.md
Last active Aug 29, 2015
Automatic WPA Supplicant Configuration for GNU/Linux
View internet_uccs.md

Get a hard-wired ethernet connection

Disable all other network daemons

This is just an example; disable and stop all active daemons.

sudo systemctl stop dhcpcd
sudo systemctl disable dhcpcd
View gist:ffaa67fca814cf0f49ec
# replace --with-python-config-dir and --with-lua-prefix with a system-specific directory
mkdir -p ~/build
cd ~/build
hg clone https://vim.googlecode.com/hg/ vim
cd vim
hg pull
hg update
# might also need --with-python-config-dir=/usr/lib64/python2.6/config
@qguv
qguv / gist:9b9c0fb45d5124dd641a
Created Sep 2, 2014
kill a process running on port 8000 (or any other port)
View gist:9b9c0fb45d5124dd641a
sudo kill `sudo lsof -t -i:8000`
@qguv
qguv / iterm2-no-dock.sh
Last active Aug 29, 2015
Remove iTerm2 from Dock & Cmd+Tab
View iterm2-no-dock.sh
defaults write /Applications/iTerm.app/Contents/Info LSUIElement true
@qguv
qguv / quota.sh
Created Dec 7, 2014
get number of files in subdirectories of this one
View quota.sh
find . -maxdepth 1 -mindepth 1 -type d | while read dir; do
printf "%-25.25s : " "$dir"
find "$dir" -type f | wc -l
done
@qguv
qguv / config.h
Created Jan 27, 2015
DWM config.h
View config.h
/* appearance */
static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#444444";
static const char normbgcolor[] = "#222222";
static const char normfgcolor[] = "#bbbbbb";
static const char selbordercolor[] = "#005577";
static const char selbgcolor[] = "#005577";
static const char selfgcolor[] = "#eeeeee";
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
View .xinitrc
#!/usr/bin/env sh
source .conf/zsh/system
# one-time configurations
xsetroot -solid "#442211"
# persistent windowbar configuration
while true; do
xsetroot -name "$(whoami)@$(uname -n) ($(uname -o)) | $(date +%R)"
sleep 1
@qguv
qguv / gist:848b225888bc3a9f3bdb
Created Mar 22, 2015
Jekyll Build/Serve Error
View gist:848b225888bc3a9f3bdb
Configuration file: /Users/quintus/dev/essays/_config.yml
Source: /Users/quintus/dev/essays
Destination: /Users/quintus/dev/essays/_site
Generating...
/Users/quintus/.local/lib/gems/gems/posix-spawn-0.3.10/lib/posix_spawn_ext.bundle: [BUG] Segmentation fault
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
@qguv
qguv / gist:a95db5756e808540b4e7
Created Mar 30, 2015
CMLS Classwork 2015-03-30
View gist:a95db5756e808540b4e7
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [
{