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 / 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
[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 / 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;

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 / 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
@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)
[master] gdr@gdr-desktop:~/Downloads/optipng-zopfli$ cat src/zopfli/makefile
make:
gcc *.c -O2 -W -Wall -Wextra -ansi -pedantic -lm -o zopfli
debug:
gcc *.c -g3 -lm -o zopfli
CFLAGS = -O2 -W -Wall -Wextra -ansi -pedantic -lm
@gjedeer
gjedeer / tt-rss-feedmod
Created October 7, 2013 15:34
Rules for some of the websites for the FeedMod plugin for TT-RSS
{
"bankier.pl": {
"type": "xpath",
"xpath": "div[@id='article_body']"
},
"makowskimarcin.pl": {
"type": "xpath",
"xpath": "div[@class='entry-content post_content']"
},
"niebezipecznik.pl": {
@gjedeer
gjedeer / detect_joomla_version.sh
Last active December 22, 2015 19:49
One-liner to detect Joomla version
# cd /your/joomla/directory
if [ -f includes/version.php ]; then echo 1.0 DETECTED; grep var\ \$RELEASE includes/version.php; grep var\ \$DEV_LEVEL includes/version.php; fi; if [ -f libraries/joomla/version.php ]; then echo 1.5 DETECTED; grep var\ \$RELEASE libraries/joomla/version.php; grep var\ \$DEV_LEVEL libraries/joomla/version.php; fi; if [ -f joomla.xml ]; then echo 2.5+ DETECTED; grep \<version\> joomla.xml; fi; if [ -f libraries/cms/version/version.php ]; then echo 2.5+ DETECTED; grep public\ \$RELEASE libraries/cms/version/version.php; grep public\ \$DEV_LEVEL libraries/cms/version/version.php; fi;
# One-liner to detect Joomla version
@gjedeer
gjedeer / detect_os_version.sh
Last active December 22, 2015 19:49
One-liner to detect Linux distro and version
# One-liner to detect Linux distro and version
cat /etc/issue;uname -a;if [ -f /etc/lsb-release ]; then echo "Ubuntu"; cat /etc/lsb-release; fi;if [ -f /etc/debian_version ]; then echo "Debian"; cat /etc/debian_version; fi;if [ -f /etc/redhat-release ]; then echo "RHEL"; cat /etc/redhat-release; fi;if [ -f /etc/SuSE-release ]; then echo "SuSE"; cat /etc/SuSE-release; fi;
# One-liner to detect Linux distro and version