Skip to content

Instantly share code, notes, and snippets.

Krzysiek Jakubik noodny

Block or report user

Report or block noodny

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
noodny / TransmissionHelper.scpt
Created Feb 26, 2018
Link magnet files to a transmission deamon running rpc
View TransmissionHelper.scpt
on open location magnet_link
set hostname to ""
set portname to "9091"
set rpc_url to "http://" & hostname & ":" & portname & "/transmission/rpc"
set cmd to "curl --silent " & rpc_url & " | sed 's/.*<code>//g;s/<\\/code>.*//g'"
set session_id to do shell script cmd
noodny /
Created Nov 8, 2017
Use CURL to get file size of a given url
bytesToHuman() {
b=${1:-0}; d=''; s=0; S=(Bytes {K,M,G,T,E,P,Y,Z}iB)
while ((b > 1024)); do
d="$(printf ".%02d" $((b % 1024 * 100 / 1024)))"
b=$((b / 1024))
let s++
echo "$b$d ${S[$s]}"
noodny / style.css
Last active Apr 13, 2017
Jenkins pipeline styles
View style.css
body {
background: red!important;
div.change-commit-id {
max-width: 20px;
overflow: hidden;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
View swiss.pls
noodny / nginx.conf
Created Jun 8, 2015
Disable default server in nginx
View nginx.conf
server {
listen 80 default_server;
server_name _;
deny all;
noodny / nginx.conf.template
Created Jun 2, 2015
Sample nginx configuration template file used by Dokku
View nginx.conf.template
server {
listen [::]:80;
listen 80;
server_name $NOSSL_SERVER_NAME;
access_log /var/log/nginx/${APP}-access.log;
error_log /var/log/nginx/${APP}-error.log;
# set a custom header for requests
add_header X-Served-By www-ec2-01;
# set max POST body size
noodny /
Last active Aug 29, 2015
DigitalOcean firewall configuration
# block all connections from the outside (incomming)
# and inside (outgoing)
ufw default deny incoming
ufw default allow outgoing
# open ssh and web related ports
ufw allow ssh
ufw allow www
# list ports status
noodny /
Created Jun 2, 2015
DigitalOcean swap file
# create a swapfie
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# make it permanent
echo "/swapfile none swap sw 0 0" >> /etc/fstab
# tweak it
echo "vm.swappiness=10" >> /etc/sysctl.conf
You can’t perform that action at this time.