Skip to content

Instantly share code, notes, and snippets.

@ddksr
ddksr / mucl.zsh-theme
Created January 9, 2015 16:12
ZSH prompt
# Oh-my-Zsh prompt created by sigi
# The theme is based on gianu but has things I really wanted to have
# Also, note this great article: http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
echo '○'
}
@ddksr
ddksr / london.org
Created January 7, 2015 20:25
London sighseeing plan for 3.5 days

London plan

Museums

  • [ ] British Museum (4h)
  • [ ] Natural History Museum (6h)
  • [ ] Tate Modern (4h)
  • [ ] Science Museum (4h)

Nature

  • [ ] London Zoo (6h)
  • [ ] St James Park (1h)

Sights (max 15min each)

@ddksr
ddksr / daemons-arch-full.xml
Created September 21, 2014 10:17
Service monitor Archlinux sources
<services>
<name>Daemons (Full Arch-specific config)</name>
<description>
This file contains a more detailed source for archlinux (or maybe systemd) specific services.
</description>
<service id="apache2-daemon-arch" priority="2" sudo="yes" icon="apache">
<name>Apache2 Webserver</name>
@ddksr
ddksr / random_file
Created September 11, 2014 20:29
Recursive random file
#!/bin/bash
dir="directory" # no slash at end
files=$(ls -R $dir | awk '
/:$/&&f{s=$0;f=0}
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}
NF&&f{ print s"/"$0 }');
list=();
while read -r line; do
list[${#list[@]}]=$line;