allex@WANG:~$ sudo install the gtk2-engines-pixbuf
/usr/lib/nux/unity_support_test -p
| find . -name \*.h -exec wc {} \; > /tmp/src.txt | |
| find . -name \*.c -exec wc {} \; >> /tmp/src.txt | |
| cat sample.py | |
| total = 0 | |
| myfile = open('src.txt') | |
| lines = myfile.readlines() | |
| for line in lines: | |
| print line.split()[0] |
| function disk(v) { | |
| // var r = ((v - 1) * 1028) + 1024; | |
| return Math.ceil(Math.ceil(v * 1024 / 7.84423828125) * 7.84423828125); | |
| } |
| window.open('', '_self', ''); | |
| window.close(); |
| title Ubuntu 11.04 | |
| find –set-root –ignore-floppies –ignore-cd /boot/grub/core.img | |
| kernel /boot/grub/core.img | |
| boot |
| // http://www.ietf.org/rfc/rfc1928.txt | |
| // Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar | |
| var States = { | |
| CONNECTED:0, | |
| VERIFYING:1, | |
| READY:2, | |
| PROXY: 3 | |
| }; |
| /* vim: set ft=javascript */ | |
| // http://addyosmani.com/polyfillthehtml5gaps/slides/#78 | |
| function getPrefix(prop){ | |
| var prefixes = ['Moz','Khtml','Webkit','O','ms'], | |
| elem = document.createElement('div'), | |
| upper = prop.charAt(0).toUpperCase() + prop.slice(1); | |
| if (prop in elem.style) | |
| return prop; |
| /* vim: set ft=javascript: */ | |
| // Javascript: Hide the iOS soft keyboard | |
| // | |
| // http://uihacker.blogspot.com/2011/10/javascript-hide-ios-soft-keyboard.html | |
| // http://stackoverflow.com/questions/5937339/ipad-safari-make-keyboard-disappear | |
| // ------------------------------------------------------------------------------- | |
| // I was having some trouble getting my text input field to relieve itself of focus on the | |
| // iPhone, and after a little searching, I came up with a couple options. It's pretty | |
| // self-explanatory. The 2nd line will de-focus all input fields, and it relies on jQuery. |
| /* vim: set ft=javascript: */ | |
| // http://dean.edwards.name/weblog/2009/12/getelementsbytagname/ | |
| function getElementsByTagName(node, tagName) { | |
| var elements = [], i = 0, anyTag = tagName === "*", next = node.firstChild; | |
| while ((node = next)) { | |
| if (anyTag ? node.nodeType === 1 : node.nodeName === tagName) elements[i++] = node; | |
| next = node.firstChild || node.nextSibling; | |
| while (!next && (node = node.parentNode)) next = node.nextSibling; | |
| } | |
| return elements; |
| <!doctype html> | |
| <title>Canvas spinner</title> | |
| <link rel=stylesheet href=s.css> | |
| <script src=s.js></script> |