Skip to content

Instantly share code, notes, and snippets.

@lobotony
lobotony / swatmd.py
Created May 11, 2022 17:15
waits for wdavdaemon_enterprise processes and kills them. run with sudo.
#!/usr/bin/env python3
import psutil
import time
def logDebug(msg):
print(time.ctime() + " " + msg)
while True:
count = 0
#Do not run this !!!
#IO operations
alias less='cat'
alias sed='awk'
#administration
alias apt-get='aptitude'
#file editing
@vdvm
vdvm / srt2vtt.sh
Created April 15, 2014 14:31
Convert .srt to .vtt
#!/bin/bash
echo "WEBVTT"
echo ""
sed '/[0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9] --> [0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]/s/,/./g' $1
@filiptepper
filiptepper / gist:1469164
Last active September 28, 2015 17:08
Rekrutacja

O nas

Durszlak jest serwisem agregującym blogi kulinarne.

Jeżeli uważasz, że to brzmi nudnie - masz rację. Dlatego potrzebujemy Ciebie, bo chcemy zrobić dużo więcej.

Wymagania

Wymagania wszyscy mają takie same.

image

@ghughes
ghughes / django.vcl
Created November 15, 2011 16:05
Django VCL for Varnish
sub vcl_recv {
# unless sessionid/csrftoken is in the request, don't pass ANY cookies (referral_source, utm, etc)
if (req.request == "GET" && (req.url ~ "^/static" || (req.http.cookie !~ "sessionid" && req.http.cookie !~ "csrftoken"))) {
remove req.http.Cookie;
}
# normalize accept-encoding to account for different browsers
# see: https://www.varnish-cache.org/trac/wiki/VCLExampleNormalizeAcceptEncoding
if (req.http.Accept-Encoding) {
if (req.http.Accept-Encoding ~ "gzip") {
@johnboxall
johnboxall / dns.py
Created August 15, 2011 21:57
Twisted DNS server!
# http://notmysock.org/blog/hacks/a-twisted-dns-story.html
# http://blog.inneoin.org/2009/11/i-used-twisted-to-create-dns-server.html
# twistd -y dns.py
import socket
from twisted.internet.protocol import Factory, Protocol
from twisted.internet import reactor
from twisted.names import dns
from twisted.names import client, server
@jamiew
jamiew / google_twunter_lol
Created July 28, 2011 20:34
All the dirty words from Google's "what do you love" project: http://www.wdyl.com/
easterEgg.BadWorder.list={
"4r5e":1,
"5h1t":1,
"5hit":1,
a55:1,
anal:1,
anus:1,
ar5e:1,
arrse:1,
arse:1,
@jdudek
jdudek / first-f.txt
Created December 7, 2010 19:31
Random Polish names generator / Generator losowych nazwisk, lista losowych nazwisk
Anna
Maria
Katarzyna
Małgorzata
Agnieszka
Krystyna
Barbara
Ewa
Elżbieta
Zofia
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
#!/bin/bash
echo "[Gmail]/All Mail" > /tmp/archive_mail_plugin_config
archive_mail_plugin_config=`cat /tmp/archive_mail_plugin_config`
echo \'$archive_mail_plugin_config\' | xargs -0 defaults write com.apple.mail ArchiveMailboxName
rm /tmp/archive_mail_plugin_config