Skip to content

Instantly share code, notes, and snippets.

Peter Ruibal fmoo

Block or report user

Report or block fmoo

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
fmoo /
Created Sep 7, 2013
my "py-haste" clownery. Features include: (1) Static css / js analyzer (syntax parsing provided by pygments) (2) Tracks @requires and @provides dependencies. (3) Makes it easier to implement javelin behaviors. (4) Makes it *super* easy to use react components.
import os
import os.path
import re
from collections import defaultdict
from pygments.lexers.web import CssLexer, JavascriptLexer
from .json import dumps
import random
fmoo /
Last active Dec 20, 2015
sparts service that uses twilio to send an SMS whenever a domain's WHOIS State changes
from sparts.vservice import VService
from sparts.vtask import TryLater
from sparts.tasks.poller import PollerTask
from sparts.sparts import option
import whois
import re
def parse_whois(data):
result = {}
fmoo /
Created Dec 29, 2012 — forked from anonymous/ftplib_simple_proxy
An FTP client implementation that supports sending and receiving data via SOCKS proxy using PASV transfers
import ftplib
import socket
import socks # socksipy (
class FTP(ftplib.FTP):
def __init__(self, host='', user='', passwd='', acct='',
"""Like ftplib.FTP constructor, but with an added `proxyconfig` kwarg
fmoo /
Created Nov 14, 2012
Clowny CLI script to get stuff out of the keyring
#!/usr/bin/env python
from __future__ import absolute_import
from argparse import ArgumentParser
from getpass import getuser, getpass
ap = ArgumentParser()
ap.add_argument('user', default=getuser(), nargs='?',
help='username [%(default)s]')
ap.add_argument('--clear', action='store_true')
fmoo / gist:4057731
Created Nov 12, 2012
Getting a Facebook Access Token in python via QWebView + Facebook Javascript SDK
View gist:4057731
from PySide.QtCore import Slot
from PySide.QtGui import QApplication, QMainWindow, QDialog, QVBoxLayout
from PySide.QtWebKit import QWebView, QWebPage, QWebSettings
import sys
from functools import partial
from argparse import ArgumentParser
ap = ArgumentParser()
ap.add_argument('app_id', type=int)
fmoo /
Created Mar 18, 2012
CONNECT-enabled HTTP Proxy Server
from twisted.web.proxy import Proxy, ProxyRequest
from twisted.internet.protocol import Protocol, ClientFactory
import urlparse
from twisted.python import log
class ConnectProxyRequest(ProxyRequest):
"""HTTP ProxyRequest handler (factory) that supports CONNECT"""
connectedProtocol = None
fmoo / gist:2018384
Created Mar 11, 2012
Tunneling arbitrary TCP connections over HTTP CONNECT requests with Twisted
View gist:2018384
from twisted.web import http
from twisted.internet import protocol, reactor
from twisted.internet.error import CannotListenError, ConnectError
from twisted.internet.interfaces import IReactorTCP
from zope.interface import implements
from twisted.python import log
class ProxyConnectError(ConnectError):
You can’t perform that action at this time.