#Litus installation
(https://github.com/LitusProject/Litus)
- Install Ubuntu server 12.04
- User
litus - Select
- Base system
- LAMP server
- OpenSSH server
| # Heapsort | |
| class Heap: | |
| def __init__(self, lst): | |
| self.list = [len(lst)] + lst | |
| k = self.poslastparent() | |
| while k >= self.posroot(): | |
| self.sink(k) | |
| k -= 1 | |
| def insert(self, val): |
| #include <glob.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <sys/types.h> | |
| #include <sys/syscall.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <pthread.h> | |
| #define NUM_WORKERS 3 |
| #!/usr/bin/env php | |
| <?php | |
| // ##### START config | |
| $files = glob('*.{mp4,flv}', GLOB_BRACE); // File types to convert to mp3 (video only) | |
| $worker_num = 3; // number of cores +1 | |
| // ##### END config | |
| $len = count($files); | |
| $worker_pids = array(); | |
| function pr($s) { |
| # 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 |
| def count(lst, elem): | |
| if len(lst) == 1: | |
| return lst[0] == elem | |
| else: | |
| return count(lst[1:], elem) + (lst[0] == elem) |
| 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 |
| #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 |
#Litus installation
(https://github.com/LitusProject/Litus)
litus| # 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 |
| #!/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 * |