First, clone git clone git@github.com:vierbergenlars/gihp.git
Check out git checkout 08dc6abfdbf90b1e1a8b10cd7064601fb820d950
And then insert the file above and run with php segv.php
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
uglifyjs original.js -c -b --comments all -o commented.js | |
uglifyjs original.js -c -m -o min.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
def and(bits1, bits2): | |
""" | |
Executes AND operation on 2 binary numbers, like it is done internally when using & operator | |
""" | |
bits_out = [] | |
while True: | |
if i > len(bits1) && i > len(bits2): | |
# We have past all bits in both numbers, break out of the loop now | |
break | |
if i < len(bits1): |
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/env python | |
""" | |
http://acm.zhihua-lai.com | |
BogoSort.py | |
Bogo Sorting Algorithm | |
30/May/2012 | |
https://raw.github.com/DoctorLai/Algorithms/master/Sorting/BogoSort.py | |
""" | |
from random import * |
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
# Run these commands and the repo will be back in sync | |
# Note: tags are lost, because the commits are rewritten | |
sudo curl http://cs.sensiolabs.org/get/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer | |
sudo chmod a+x /usr/local/bin/php-cs-fixer | |
git filter-branch --tree-filter "php-cs-fixer fix .>/dev/null" --all |
#Litus installation
(https://github.com/LitusProject/Litus)
- Install Ubuntu server 12.04
- User
litus
- Select
- Base system
- LAMP server
- OpenSSH server
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
#deb cdrom:[Ubuntu-GNOME 13.04 _Raring Ringtail_ - Release amd64 (20130424)]/ raring main multiverse restricted universe | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://be.archive.ubuntu.com/ubuntu/ raring main restricted | |
deb-src http://be.archive.ubuntu.com/ubuntu/ raring main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://be.archive.ubuntu.com/ubuntu/ raring-updates main restricted |
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
apt-get install -y perl libwww-mechanize-perl | |
mv kotnet_login.pl /etc/NetworkManager/dispatcher.d/02kotnet | |
ln -s /etc/NetworkManager/dispatcher.d/02kotnet /etc/init.d/kotnet | |
update-rc.d kotnet defaults |
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
def count(lst, elem): | |
if len(lst) == 1: | |
return lst[0] == elem | |
else: | |
return count(lst[1:], elem) + (lst[0] == elem) |
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
# About this gist: http://vierbergenlars.wordpress.com/2013/06/07/tweaking-ubuntu-gnome-with-conky/ | |
# Conky settings # | |
background no | |
update_interval 1 | |
cpu_avg_samples 2 | |
net_avg_samples 2 | |
if_up_strictness address |
OlderNewer