Skip to content

Instantly share code, notes, and snippets.

dx dequis

Block or report user

Report or block dequis

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
@dequis
dequis / n26_ynab.py
Created Jan 4, 2020
Script I use to send n26 transactions to YNAB. Not documented as it's not really intended to be used by anyone but me but good luck.
View n26_ynab.py
import requests
from n26.api import Api as N26Api
from datetime import datetime, timedelta
from pprint import pprint
ENABLE_YNAB = True
YNAB_TOKEN = '...'
BUDGET_ID = '...'
ACCOUNT_ID = '...'
@dequis
dequis / mcresources.py
Last active May 1, 2019
This script prints a list of URLs required to download all the minecraft resources that the new launcher can access (jars, libraries, assets) Redirect stdout to a file to do something useful with it.
View mcresources.py
"""
This script prints a list of URLs required to download all the minecraft
resources that the new launcher can access (jars, libraries, assets)
Redirect stdout to a file to do something useful with it.
Will store cached json indexes in
versions.json
versions/*.json
@dequis
dequis / skypeweb.dot
Last active May 26, 2018
skypeweb troubleshooting flowchart http://dequis.org/skypeweb.png
View skypeweb.dot
digraph {
graph [nodesep=0.1, pad="1,0"];
node [fontsize=9, fontname="DejaVu Sans", margin=0.01];
edge [fontsize=9, fontname="DejaVu Sans"];
start [label="I'm getting an error\ntrying to log in to skypeweb"];
using_latest [label="Are you using\nskypeweb 1.5 or newer?"];
using_latest_no [label="Upgrade to the\nlatest version"];
View bitlbee_ssl.c
// gcc -g -shared -fPIC $(pkg-config --cflags bitlbee) bitlbee_ssl.c -o bitlbee_ssl.so
#include <bitlbee.h>
#include <ssl_client.h>
static void
beessl_init(account_t *acct)
{
}
View steven pinger.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dequis
dequis / patch.py
Last active Dec 19, 2017
MSN ApplicationId binary patcher for pidgin/bitlbee/etc - OBSOLETE now that pidgin/bitlbee have the correct fix - READ THE COMMENTS!
View patch.py
#!/usr/bin/env python
"""
MSN ApplicationId patcher for pidgin/bitlbee/whatever
(because you're too lazy to rebuild the whole thing.)
Usage examples:
python patch.py /usr/sbin/bitlbee
python patch.py /usr/lib/purple-2/libmsn.so
@dequis
dequis / gregex.c
Created Feb 11, 2017
Fuzzing test cases for GRegex/posix regexps
View gregex.c
/*
$ gcc $(pkg-config --cflags glib-2.0) -lpthread gregex.c libglib-2.0.a libpcre.a -o gregex
$ echo -n 'pattern\ntext' | ./gregex
*/
#include <glib.h>
#include <string.h>
int main() {
GRegex *preg;
@dequis
dequis / yaccparse.py
Created May 19, 2013
a script that reads a file and outputs the same file.
View yaccparse.py
'''
Parses a yacc grammar file.
Also removes left recursion from the output.
That's all.
Licensed under the GNU LGPL. This is distributed in the hope that it
will be useful, but WITHOUT ANY WARRANTY, because it probably won't be.
See the GNU Lesser General Public License for more details.
'''
@dequis
dequis / gist:3068521
Created Jul 7, 2012
mc3p asyncore based listener
View gist:3068521
diff --git a/mc3p/proxy.py b/mc3p/proxy.py
index d40627e..b2bc174 100644
--- a/mc3p/proxy.py
+++ b/mc3p/proxy.py
@@ -81,18 +81,25 @@ and forward that connection to <host>:<port>."""
return (host, port, opts, pcfg)
-def wait_for_client(port):
- """Listen on port for client connection, return resulting socket."""
@dequis
dequis / freecam.py
Created Jul 7, 2012
Freecam plugin for mc3p
View freecam.py
from mc3p.plugins import MC3Plugin, msghdlr
class FreecamPlugin(MC3Plugin):
def init(self, args):
self.freecam = False
self.last_pos = None
self.safe = True
self.abilities = None
You can’t perform that action at this time.