Skip to content

Instantly share code, notes, and snippets.

@cr5315
cr5315 / addie.py
Created May 10, 2014 19:56
addie.cc module for my IRC bot (based on Code by Liamraystanley)
from util.hook import *
import urllib2
@hook(cmds=['addie'], ex='addie cr5315 doge')
def addie(code, input):
"""addie <user> <coin> - Get an address from addie.cc"""
try:
args = input.group(2).split(' ')
except:
args = []
@cr5315
cr5315 / whois-ns-info.py
Created July 13, 2014 08:39
I got tired of typing /whois <nick> and /ns info <nick>, so now I just type /whoisns <nick>
__module_name__ = "whois and ns info"
__module_version__ = "1.0"
__module_description__ = "performs a whois and ns info"
import hexchat
def who(word, word_eol, userdata):
if len(word) < 2:
print("I need a nick")
else:
@cr5315
cr5315 / hardcore-address.py
Last active August 29, 2015 14:04
hardc0re left for a few days. So I made these.
from util.hook import *
import urllib2
import json
# Global Shizz
hdr = {'User-Agent': 'Mozilla/5.0'}
################################################################################
@hook(cmds=["addressbalance", "abalance", "bal"], rate=15, args=True)
def getbalance(code, input):
@cr5315
cr5315 / chromecast.py
Last active August 29, 2015 14:04
Updated with more invalid file checking
import json
import sys
import urllib
import urllib2
js = json.load(urllib2.urlopen("https://raw.githubusercontent.com/dconnolly/chromecast-backgrounds/master/backgrounds.json"))
count = 0
validCount = 0
@cr5315
cr5315 / vanitygen-sort.py
Last active August 29, 2015 14:05
Sort addresses from vanitygen into folders with the address/privkey in a text file and a QR code
# Requires Pillow and qrcode
# pip install Pillow qrcode
from qrcode import *
from PIL import Image
import os
import errno
def make_data(vanitygen_output_file):
# Each address from vanitygen takes three lines
__module_name__ = "Flashbang"
__module_version__ = "1.0"
__module_description__ = "Flash, aaahhhh"
__author__ = "cr5315"
import hexchat as hc
PENDING_COMMANDS = []
class Command(object):
@cr5315
cr5315 / cherry-pick.py
Created January 1, 2015 21:25
Python script to auto cherry-pick changes, reads from files that have a .cp extension
import os
import subprocess
import time
OFFSET = raw_input("Please enter any path between this script and your ROM source (blank for none): ")
# Do some setup
STARTING_DIR = os.getcwd()
STARTING_TIME = time.time()
@cr5315
cr5315 / MainActivity.java
Last active December 17, 2015 16:28
Simple MVP Example
package butzow.me.chan.ui.main;
import android.support.design.widget.Snackbar;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
@cr5315
cr5315 / vend.py
Created March 12, 2016 23:00
vend.py
from util.hook import *
from util import output
import random
# vend.py
#
# It vends!
#
# Version 2.0
@cr5315
cr5315 / colors.xml
Created October 25, 2014 01:56
Material palettes for Android colors.xml
<!-- Red -->
<color name="red">#e51c23</color>
<color name="red_50">#fde0dc</color>
<color name="red_100">#f9bdbb</color>
<color name="red_200">#f69988</color>
<color name="red_300">#f36c60</color>
<color name="red_400">#e84e40</color>
<color name="red_500">#e51c23</color>
<color name="red_600">#dd191d</color>
<color name="red_700">#d01716</color>