Skip to content

Instantly share code, notes, and snippets.

View smallevilbeast's full-sized avatar
😂

evilbeast smallevilbeast

😂
View GitHub Profile
@smallevilbeast
smallevilbeast / dellg15_alienfx.md
Last active November 17, 2023 05:25
dellg15_alienfx

安装依赖

pip install pyusb

添加设备权限

sudo vim /etc/udev/rules.d/10-alienfx.rules
@smallevilbeast
smallevilbeast / setup-dev.sh
Created July 19, 2018 22:24 — forked from freewayspb/setup-dev.sh
Install homebrew, nginx, mysql, php56, and composer on Mac OS X
#!/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:

Objective-C on Linux

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
@smallevilbeast
smallevilbeast / PostGui for PyQt
Created December 19, 2013 03:18
PostGui for PyQt
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)
@smallevilbeast
smallevilbeast / gist:8018653
Created December 18, 2013 07:37
pyqt test
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(
@smallevilbeast
smallevilbeast / gist:7801180
Last active December 30, 2015 08:09
post gui for PyQt
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)
}