Skip to content

Instantly share code, notes, and snippets.

View gjedeer's full-sized avatar
💭
Fucking kittens

GDR! gjedeer

💭
Fucking kittens
View GitHub Profile
@gjedeer
gjedeer / blacklist_clients
Created January 10, 2014 12:04
/etc/postfix/blacklist_clients - lista serwerów spamujących polskie skrzynki mailowe
/freshmail\.pl$/ REJECT Spamerzy wypierdalac (FRESHMAIL)
/inis\.pl$/ REJECT Spamerzy wypierdalac (INIS)
/e-mailing\.com\.pl$/ REJECT Spamerzy wypierdalac (EMAILING)
/e-mailing\.info\.pl$/ REJECT Spamerzy wypierdalac (EMAILING)
/redlink\.pl$/ REJECT Spamerzy wypierdalac (REDLINK)
/biznesmail\.biz\.pl$/ REJECT Spamerzy wypierdalac (BIZNESMAIL)
/biznesmail\.org\.pl$/ REJECT Spamerzy wypierdalac (BIZNESMAIL)
/biznesmail\.mail\.pl$/ REJECT Spamerzy wypierdalac (BIZNESMAIL)
/biznesmail\.sx$/ REJECT Spamerzy wypierdalac (BIZNESMAIL)
/delivery-gateway\.com$/ REJECT Spamerzy wypierdalac (DELIVERYGATEWAY)
@gjedeer
gjedeer / graphios.init
Created January 17, 2014 20:14
Graphios sysvinit file for debian
#! /bin/bash
### BEGIN INIT INFO
# Provides: graphios
# Required-Start: $local_fs $remote_fs $syslog $named $network $time nagios3
# Required-Stop: $local_fs $remote_fs $syslog $named $network
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: graphios bridge between nagios and graphite

Keybase proof

I hereby claim:

  • I am gjedeer on github.
  • I am gdr (https://keybase.io/gdr) on keybase.
  • I have a public key whose fingerprint is 11C1 B15A 5D5D D662 E469 928A EBDA 6B97 4ED3 D2B7

To claim this, I am signing this object:

@gjedeer
gjedeer / gist:4fafccd1802ebc62eb26
Created December 13, 2014 09:33
Test case for #1197
#include <tox/tox.h>
#include <stdio.h>
static Tox_Options tox_options;
Tox *tox;
int main(int argc, char **argv)
{
tox_options.ipv6enabled = TOX_ENABLE_IPV6_DEFAULT;
tox_options.udp_disabled = 0;
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Before tox_new()
Breakpoint 1, new_messenger (options=0xbefff5d0) at ../toxcore/Messenger.c:1570
1570 if ( ! m )
(gdb) c
Continuing.
Breakpoint 7, new_networking (ip=..., port=33445) at ../toxcore/network.c:484
@gjedeer
gjedeer / farewell_opera.py
Created June 8, 2015 21:14
Opera's speeddial.ini to bookmark.html converter. Bookmark.html can be imported to Chromium, Firefox and other browsers.
#!/usr/bin/python
"""
Opera's speeddial.ini to bookmark.html converter
Bookmark.html can be imported to Chromium, Firefox and other browsers
"""
import cgi
import codecs
import re
import sys
@gjedeer
gjedeer / boto_sns.py
Created June 24, 2015 22:01
How to send a push notification directly to device using Python, Boto and SNS
import boto
import boto.exception
import boto.sns
import pprint
import re
def send_push(device_id, body):
region = [r for r in boto.sns.regions() if r.name==u'eu-west-1'][0]
sns = boto.sns.SNSConnection(
@gjedeer
gjedeer / eps2png
Created January 20, 2016 12:05 — forked from anonymous/eps2png
Mass convert EPS to PNG files
for i in *.eps; do gs -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dUseCIEColor -r300x300 "-sOUTPUTFILE=$i.png" "$i"; done
#!/usr/bin/python
import os
import os.path
import ovh
import pprint
import shutil
client = ovh.Client()
/*
* test process event connector - cn_proc.c
*
* cc $(shell pkg-config --cflags glib-2.0) \
* $(shell pkg-config --libs glib-2.0) \
* -o cn_proc cn_proc.c
*
* Listens for process events (fork, exec, change uid/gid/..., and exit)
* received through a kernel connector and prints them.
*