This file contains hidden or 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
| function mkcd() { mkdir "$1" && cd "$_"; } | |
| function extract () { | |
| if [ -f $1 ] ; then | |
| case $1 in | |
| *.tar.bz2) tar xvjf $1 ;; | |
| *.tar.gz) tar xvzf $1 ;; | |
| *.bz2) bunzip2 $1 ;; | |
| *.rar) unrar x $1 ;; | |
| *.gz) gunzip $1 ;; | |
| *.tar) tar xvf $1 ;; |
This file contains hidden or 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
| (setq backup-directory-alist | |
| `((".*" . ,temporary-file-directory))) | |
| (setq auto-save-file-name-transforms | |
| `((".*" ,temporary-file-directory t))) | |
| (setq backup-directory-alist '(("." . "~/.emacs.d/backup")) | |
| backup-by-copying t ; Dont delink hardlinks | |
| version-control t ; Use version numbers on backups | |
| delete-old-versions t ; Automatically delete excess | |
| kept-new-versions 20 ; how many of the newest version | |
| kept-old-versions 5 ; and how many of the old |
This file contains hidden or 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
| alias rmatrix='echo -ne "\e[31m" ; while true ; do echo -ne "\e[$(($RANDOM % 2 + 1))m" ; tr -c "[:print:]" " " < /dev/urandom | dd count=1 bs=50 2> /dev/null ; done' | |
| alias gmatrix='echo -ne "\e[32m" ; while true ; do echo -ne "\e[$(($RANDOM % 2 + 1))m" ; tr -c "[:print:]" " " < /dev/urandom | dd count=1 bs=50 2> /dev/null ; done' |
This file contains hidden or 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
| # /etc/udev/rules.d/51-android.rules | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”0502″, MODE=”0666″, GROUP=”plugdev” | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”0B05″, MODE=”0666″, GROUP=”plugdev” | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”413C”, MODE=”0666″, GROUP=”plugdev” | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”0489″, MODE=”0666″, GROUP=”plugdev” | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”091E”, MODE=”0666″, GROUP=”plugdev” | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”18D1″, MODE=”0666″, GROUP=”plugdev” | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”109B”, MODE=”0666″, GROUP=”plugdev” | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”0BB4″, MODE=”0666″, GROUP=”plugdev” | |
| SUBSYSTEM==”usb”, ATTR{idVendor}==”12D1″, MODE=”0666″, GROUP=”plugdev” |
This file contains hidden or 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
| import time | |
| OCCUPIED = 1 # oznaka da se polje koristi | |
| FREE = 0 # oznaka da je polje prazno | |
| OUTPUT = True # zastavica za oznaku dal je ispis omogucen | |
| # vracanje kontenjera(ploce) bez vrijednosti | |
| def remove(container, value): | |
| container.remove(value) | |
| return container |
This file contains hidden or 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
| #server | |
| import socket | |
| import threading | |
| import time | |
| SIZE = 4 | |
| soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM) | |
| soc.bind(('127.0.0.1',5432)) | |
| soc.listen(5) |
This file contains hidden or 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
| #include <iostream> | |
| #include <string> | |
| #include <vector> | |
| #include <fstream> | |
| using namespace std; | |
| class cstudent | |
| { | |
| public: | |
| long long mat_broj; | |
| string ime_prezime; |
This file contains hidden or 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
| http://www.paulgraham.com/avg.html | |
| http://programmers.stackexchange.com/questions/55284/is-lisp-still-useful-in-todays-world-which-version-is-most-used | |
| http://norvig.com/paip.html | |
| http://stackoverflow.com/questions/108201/common-lisp-or-scheme |
This file contains hidden or 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
| JS | |
| function validatePass(p1, p2) | |
| { | |
| if (p1.value != p2.value || p1.value == '' || p2.value == '') | |
| { | |
| p2.setCustomValidity('Password incorrect'); | |
| } else { | |
| p2.setCustomValidity(''); | |
| } | |
| } |
This file contains hidden or 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
| find . -mtime 0 -print | awk '{print "scp "$0" user@hostname:/a/b"}' |