Skip to content

Instantly share code, notes, and snippets.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ItsMeooooooo
ItsMeooooooo / gist:f8ac2b290a4dee7e6a6a
Created June 12, 2015 06:34
Check gzip compression on webserver
curl -I -H 'Accept-Encoding: gzip,deflate' http://www.bubbleclub.de
@ItsMeooooooo
ItsMeooooooo / gist:4543fbd8ad91e95c5503
Created August 6, 2015 09:12
show the most accessed URL in web server log
awk '{print $7}' access.log | sort | uniq -c | sort -rn
@ItsMeooooooo
ItsMeooooooo / del.ps1
Last active May 3, 2016 08:10
Deleting files from a given list on Windows Powershell
$targetfolder = "C:\foo\bar\nattebums"
$files = gc C:\foo\bar\list.txt
foreach ($file in $files)
{write-host "Deleting $file" -foregroundcolor "Red"; Remove-Item $file | out-null}
write-host "D O N E" -foregroundcolor "Red"
@ItsMeooooooo
ItsMeooooooo / mountftp.sh
Created August 27, 2015 09:35
Mount FTP servers on Linux as folder
yum install curlftpfs -y
curlftpfs ftp://user:[email protected] /mnt/ftp_mounted
location ~ .(gif|png|jpe?g)$ {
valid_referers none blocked mywebsite.com *.mywebsite.com;
if ($invalid_referer) {
return 403;
}
}
location /pict/ {
valid_referers none blocked mywebsite.com *.mywebsite.com;
if ($invalid_referer) {
import os
import sys
files = os.listdir(sys.argv[1])
for f in files:
os.rename(f, f.replace(' ', '_'))
@ItsMeooooooo
ItsMeooooooo / haconfig.sh
Created March 19, 2016 14:28 — forked from jlazic/haconfig.sh
Split monolithic HAProxy configuration
#!/bin/bash
#Requirements: etckeeper, diffcolor
#This script concatenates multiple files of haproxy configuration into
#one file, and than checks if monolithic config contains errors. If everything is
#OK with new config script will write new config to $CURRENTCFG and reload haproxy
#Also, script will commit changes to etckeeper, if you don't use etckeeper you
#should start using it.
#Script assumes following directory structure:
#/etc/haproxy/conf.d/
@ItsMeooooooo
ItsMeooooooo / gist:80445f6074b16a4350466fe1b75ea235
Created December 12, 2016 14:10 — forked from motey/gist:3028650e159d1e4e3bd30312aa822954
Musterbrief an Landgericht Hamburg bzgl. Beschluss vom 18. November (Az. 310 O 402/16)
https://www.heise.de/forum/heise-online/News-Kommentare/Gericht-bestaetigt-Haftung-fuer-Urheberrechtsverletzungen-auf-verlinkten-Seiten/Musterbrief/posting-29616440/show/
Sehr geehrte Damen und Herren,
gerne würde ich über ihren Beschluss vom 18. November (Az. 310 O 402/16) auf meiner Internetseite berichten. Im Rahmen der Berichterstattung möchte ich auch einen Link auf ihre Rechtsprechungsdatenbank hinterlegen, damit sich die Leser meines Berichts ein Bild über die Rechtsprechung ihres Hauses machen können.
Da ich nicht über Einsicht in alle ihre Vertragsangelegenheiten habe und somit nicht feststellen kann, ob für manche Medien auf ihrer Seite die Nutzungsrechte evtl. zeitlich beschränkt waren, komme ich auf diesem Wege meiner Pflicht zur Nachforschung nach und möchte mir von Ihnen als Seitenbetreiber eine Versicherung an Eides statt einholen, dass sie die entsprechenden Rechte zur Veröffentlichung haben.
Zur Vermeidung späterer Rechtsnachteile bitte ich hiermit im Sinne ihres o.g. Beschlusses um schri
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -sOutputFile=output.pdf input.pdf
/screen – Lowest quality, lowest size
/ebook – Moderate quality
/printer – Good quality
/prepress – Best quality, highest size