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 / pluginmanager.py
Created Jan 1, 2010
trimmed down PackageResource
View pluginmanager.py
'''Handles plugin importing'''
import os
import sys
import logging
log = logging.getLogger('pluginmanager')
class PackageResource:
'''Handle various files that could be put in the package'''
def __init__(self, base_dir, directory):
@dequis
dequis / gist:2925904
Created Jun 13, 2012
#mcdevs log, Jun 11 2012, timestamps are GMT-3
View gist:2925904
12:47 < dx> "Explosion (0x3C) - This command is not fully understood" :(
12:47 < dx> can't we cheat and ask Dinnerbone what's the fourth field of the explosion packet?
12:48 < Dinnerbone> What
12:48 < Dinnerbone> Uh
12:48 < dx> it says unknown on the wiki, "radius?" on the notes
12:48 < Dinnerbone> Range?
12:48 < Dinnerbone> Radius
12:48 < Dinnerbone> Yes
12:49 < dx> but why would it be included, if the record list includes all the blocks? or is it for the animation?
12:50 < Dinnerbone> I don't know :(
@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
@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 / 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.
'''
View personal_api.py
try:
from urllib.parse import quote
except ImportError:
# Python 2
from urllib import quote
import requests
# Session
ssomobile = "https://ssomobile.personal.com.ar/loginMobile/"
@dequis
dequis / ed.py
Created Aug 3, 2014
GNU Ed 2.0 (python version)
View ed.py
#!/usr/bin/env python
# GNU Ed 2.0 (python version)
#
# Copyright (C) 1994 Andrew L. Moore.
# Copyright (C) 2014 Free Software Foundation, Inc.
# Copyright (C) 2014 dx
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
View gist:13f2f99f5a7123641e4a

Keybase proof

I hereby claim:

  • I am dequis on github.
  • I am dx (https://keybase.io/dx) on keybase.
  • I have a public key whose fingerprint is 073F ACF0 DE15 A41B 182F 1915 4834 89D0 12FE 1773

To claim this, I am signing this object:

View gist:0673902b4dc216b79b5e
# logs from #irssi, 2014-03-19
# cleaned up to remove unrelated comments, empty lines added for readability where relevant
# i joined the channel in the middle of it to ask about something else
01:25 < tinypoodle> further trial shows the bug being triggered with any string after any amount of empty spaces at start of line, whenever hitting tab while cursor is not positioned after any character of string (i.e. at any position of empty space *or* on first char in string)
01:26 < tinypoodle> not sure if the description is fully clear...
01:28 < tinypoodle> the oddish part is that ineach case the cursor jumps to end of line instantly
01:28 < dx> tinypoodle: what am i supposed to see when i do what you described there?
01:29 < tinypoodle> dx: 3 lines of error messages, but only when done in status window
01:29 < dx> oh, yeah, i can reproduce that
@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
You can’t perform that action at this time.