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
# pip install pysimplesoap | |
import os | |
import random | |
from BaseHTTPServer import HTTPServer | |
from pysimplesoap.server import SoapDispatcher, SOAPHandler | |
def GetQuantityInStock(ProductName): | |
return random.randint(0, 500) |
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
convert -resize 2048x2896 -density 300 -page A4 $(ls -rt *.jpg | sort) -compress jpeg -quality 90 -extent 2048x2896 output.pdf |
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
stty -raw echo |
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
alias j='python -mjson.tool' |
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
Replace: \{% url ([^']\w+) | |
With: {% url '\1' |
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
sudo python -m smtpd -n -c DebuggingServer localhost:25 |
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
# pip install requests | |
import re | |
import requests | |
UCILNICA_LOGIN_URL = 'https://ucilnica.fri.uni-lj.si/login/index.php' | |
UCILNICA_LOGGEDIN_URL = 'https://ucilnica.fri.uni-lj.si/' | |
def ucilnica_login(username, password): | |
"""Check login for FRI ucilnica |
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
rseed=42 | |
random=0 | |
function generate_random { | |
if [[ $rseed == 0 ]]; then | |
rseed=123459876 | |
fi | |
h=$(($rseed / 127773)) | |
l=$(($rseed % 127773)) |
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
# Install node-java | |
# npm install java | |
# Create file Foo.scala | |
# case class Foo(bar: String, baz: String) | |
# and compile it | |
# scalac Foo.scala | |
java = require 'java' |
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
angular.module('Queue') | |
.factory('Queue', ($q) -> | |
class Queue | |
constructor: -> | |
@queue = [] | |
@processing = no | |
enqueue: (func) => | |
defer = $q.defer() |