pip install pyusb
sudo vim /etc/udev/rules.d/10-alienfx.rules
#!/bin/bash | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
from UserDict import DictMixin | |
class OrderedDict(dict, DictMixin): | |
def __init__(self, *args, **kwds): | |
if len(args) > 1: | |
raise TypeError('expected at most 1 arguments, got %d' % len(args)) | |
try: | |
self.__end | |
except AttributeError: |
Just run:
curl -ks https://gist.github.com/nicerobot/5652802/raw/install.sh | bash -
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
import functools | |
from PyQt5 import QtCore | |
class postGui(QtCore.QObject): | |
throughThread = QtCore.pyqtSignal(object, object) | |
def __init__(self, inclass=True): | |
super(postGui, self).__init__() | |
self.throughThread.connect(self.onSignalReceived) |
import os | |
import sys | |
from PyQt4.QtCore import * | |
def quit(): | |
print "Memory: ", int(os.popen('ps -p %d -o rss | tail -1' % os.getpid()).read()) | |
sys.exit() | |
class Test(QObject): | |
@pyqtSlot() |
from pyxmpp2.etree import ElementTree | |
from pyxmpp2.interfaces import StanzaPayload, payload_element_name | |
''' | |
def get_vcard(self, jid, callback=None): | |
if not callback: | |
callback = self.vcard_callback | |
q = Iq( |
class postGui(QtCore.QObject): | |
throughThread = QtCore.pyqtSignal(object, object) | |
def __init__(self, func): | |
super(postGui, self).__init__() | |
self.throughThread.connect(self.onSignalReceived) | |
self._func = func | |
self._obj = None | |
import urllib2 | |
import threading | |
from Queue import Queue | |
import sys, os, re | |
class ThreadedDownload(object): | |
REGEX = { | |
'hostname_strip':re.compile('.*\..*?/', re.I) | |
} |