Skip to content

Instantly share code, notes, and snippets.

Marcel Lauhoff irq0

Block or report user

Report or block irq0

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
View eventphone_callerid.py
#!/usr/bin/env python
import requests
import sys
req = requests.get("https://www.eventphone.de/guru2/phonebook?event=Chaos+Communication+Camp+2015&s={}&installedonly=0&format=json".format(sys.argv[1]), verify=False)
if req.ok:
print req.json()[0]["name"]
@irq0
irq0 / logstash.conf
Created Oct 28, 2014
logstash config - extract data from ceph logs
View logstash.conf
input {
gelf {
port => 12222
type => gelf
codec => json { }
}
}
filter {
if [type] == "gelf" {
@irq0
irq0 / attach_image.py
Last active Aug 29, 2015
rss2email post-processor: Attach images
View attach_image.py
import re
import requests
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
URL_REGEX = re.compile(r"""((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.‌​][a-z]{2,4}/)(?:[^\s()<>]+|(([^\s()<>]+|(([^\s()<>]+)))*))+(?:(([^\s()<>]+|(‌​([^\s()<>]+)))*)|[^\s`!()[]{};:'".,<>?«»“”‘’]))""", re.DOTALL)
def fetch_img(url):
result = None
View gist:c176fbdd0c3889c16093
{:user {:plugins [[lein-ancient "0.5.5"]
[lein-ritz "0.7.0"]]
:repl-options {:nrepl-middleware [io.aviso.nrepl/pretty-middleware
cider.nrepl.middleware.inspect/wrap-inspect
cider.nrepl.middleware.classpath/wrap-classpath
cider.nrepl.middleware.complete/wrap-complete
cider.nrepl.middleware.info/wrap-info
cider.nrepl.middleware.inspect/wrap-inspect
cider.nrepl.middleware.macroexpand/wrap-macroexpand
View .gitattributes
*.xml diff=xml
*.png diff=exif
*.xml2 diff=xml
View download_flashair
#!/bin/bash
URL="http://doxieflashair.local"
DIRS="/DCIM/100DOXIE"
list () {
curl -s "${URL}/command.cgi?op=100&DIR=${1}" \
| awk 'BEGIN { FS=","; OFS="/" } /.+,(.+,){3}/ { print $1,$2 }'
}
View profiles.clj
{:user {:plugins [[lein-ancient "0.5.4"]
[lein-ritz "0.7.0"]]
:repl-options {:nrepl-middleware [io.aviso.nrepl/pretty-middleware
inspector.middleware/wrap-inspect
ritz.nrepl.middleware.javadoc/wrap-javadoc
ritz.nrepl.middleware.apropos/wrap-apropos]}
:dependencies [[spyscope "0.1.4"]
[org.clojure/tools.namespace "0.2.4"]
@irq0
irq0 / fireplace
Created Dec 11, 2013
Play a nice fireplace video on XBMC
View fireplace
#!/bin/bash
xbmc_play_url $(youtube-dl -g $(youtube_search.py fireplace hd | sort -R | cut -f1 -d " " | head -1))
View gist:7491283
TXTBLK='\e[0;30m' # Black - Regular
TXTRED='\e[0;31m' # Red
TXTGRN='\e[0;32m' # Green
TXTYLW='\e[0;33m' # Yellow
TXTBLU='\e[0;34m' # Blue
TXTPUR='\e[0;35m' # Purple
TXTCYN='\e[0;36m' # Cyan
TXTWHT='\e[0;37m' # White
BLDBLK='\e[1;30m' # Black - Bold
BLDRED='\e[1;31m' # Red
@irq0
irq0 / org-mail-todo.py
Created Nov 6, 2012
Script to capture org-mode TODOs from mutt
View org-mail-todo.py
?? build/
#!/usr/bin/env python
import sys
import email.parser
from subprocess import call
import urllib
def make_org_link(**kwargs):
return "[[{link}][{title}]]".format(**kwargs)
You can’t perform that action at this time.