Skip to content

Instantly share code, notes, and snippets.

View kaihendry's full-sized avatar

Kai Hendry kaihendry

View GitHub Profile
@kaihendry
kaihendry / gist:1708656
Created January 31, 2012 03:51
git submodule
localhost:~$ git submodule update
No submodule mapping found in .gitmodules for path '.vim/bundle/vim-html5'
localhost:~$ cat .gitmodules
[submodule "/home/hendry/.vim/bundle/vim-html5"]
path = /home/hendry/.vim/bundle/vim-html5
url = git@github.com:kaihendry/vim-html5.git
localhost:~$ git submodule init
No submodule mapping found in .gitmodules for path '.vim/bundle/vim-html5'
localhost:~$ ls .vim/bundle/vim-html5
localhost:~$
x220:/srv/www/greptweet/bootstrap$ git checkout v2.0.3
Note: checking out 'v2.0.3'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
@kaihendry
kaihendry / gist:3170423
Created July 24, 2012 14:53
This works well
x220:/srv/www/greptweet$ cat foo.cgi
#!/bin/bash
exec 2>&1
cat <<END
Cache-Control: no-cache
Content-Type: text/html
END
./foo-script.sh & disown
root@x220:/opt/firefox# apt-get remove iceape
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
iceweasel
Suggested packages:
fonts-lyx ttf-lyx latex-xft-fonts xfonts-mathml ttf-mathematica4.1
The following packages will be REMOVED:
iceape iceape-browser
root@x220:/opt/firefox# apt-get remove iceape iceweasel
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package iceweasel is not installed, so not removed
The following extra packages will be installed:
dbus dbus-x11 esound-common galeon galeon-common gconf2 gconf2-common gnome-mime-data gvfs libart-2.0-2 libatasmart4 libaudiofile0 libavahi-glib1 libbonobo2-0
libbonobo2-common libbonoboui2-0 libbonoboui2-common libeggdbus-1-0 libesd0 libgail18 libgconf2-4 libgdu0 libglade2-0 libgnome-desktop-2-17 libgnome-keyring0
libgnome2-0 libgnome2-common libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libgudev-1.0-0 libhal-storage1
libhal1 libidl0 libmozjs2d liborbit2 libparted0debian1 libpolkit-backend-1-0 libpolkit-gobject-1-0 libsgutils2-2 mime-support psmisc python python-minimal python2.6
wait_for() # http://stackoverflow.com/questions/11827252
{
np=$(mktemp -u)
mkfifo $np # named pipe needed to get output out of inotifywait
inotifywait -m -e create "$(dirname $1)" > $np 2>&1 &
ipid=$!
while read output
do
if test -p "$1"
then
@kaihendry
kaihendry / gist:3338814
Created August 13, 2012 09:45
How does Plymouth actually work?

bin/plymouth lib/libply-splash-core.so.2.0.0 lib/libply.so.2.0.0 sbin/plymouthd usr/lib/libply-boot-client.so.2.0.0 usr/lib/plymouth/details.so usr/lib/plymouth/plymouth/plymouth-populate-initrd usr/lib/plymouth/text.so usr/sbin/plymouth-set-default-theme

x220:~$ cat cronjobs
Tue Jul 10 00:00:01 CEST 2012
Mon Jul 16 12:58:01 CEST 2012
Tue Jul 17 12:58:02 CEST 2012
Wed Jul 18 12:58:01 CEST 2012
Thu Jul 19 12:58:01 CEST 2012
Fri Jul 20 12:58:01 CEST 2012
Sat Jul 21 13:20:01 CEST 2012
Sun Jul 22 15:28:01 CEST 2012
Mon Jul 23 15:28:01 CEST 2012
@kaihendry
kaihendry / gist:3403839
Created August 20, 2012 12:59
os news submission
<p>
<b>Binary OS entirely managed within Git</b>
</p><p>
Webconverger's rootfs is hosted on <a href="https://github.com/Webconverger/webc">Github</a>. From here the rootfs is curated largely using Debian packages to do one thing and one thing well, to provide the best Web kiosk environment.
</p><p>
The daily builds clone from github, and the future plans are to integrate <a href="https://github.com/Webconverger/git-fs">Git-FS</a> to decrease the payload size and most excitedly, provide efficient binary <a href="http://webconverger.org/upgrade/">upgrades</a>.
</p><p>
Download the latest update from the <a href="http://webconverger.org/blog/entry/Webconverger_14.0_release/">Webconverger 14 release dates</a> which is tag signed.
</p>
<b><u>About the author:</b></u><br />
x220:/etc$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 08:11:96:ae:2d:3c brd ff:ff:ff:ff:ff:ff
inet 192.168.1.128/24 brd 192.168.1.255 scope global wlan0
inet6 fe80::a11:96ff:feae:2d3c/64 scope link