Skip to content

Instantly share code, notes, and snippets.

@cr5315
cr5315 / config.py
Created June 24, 2017 18:22
Instagram Follower Count
# This is the list of Instagram accounts you want to get the follower counts of
# An @ is not required at the start of the name, and will be removed if there is one
INSTAGRAM_ACCOUNTS = [
"nasa"
]
# Telegram bot token acquired from the BotFather
TELEGRAM_BOT_TOKEN = "GET_ONE"
# Telegram "chat ids" where the message will be sent
@cr5315
cr5315 / usbank.js
Created March 24, 2016 20:28
Tasker script to calculate bank balance from SMS messages
console.log("US Bank Balance Tasker Task");
var TYPE_DEPOSIT = 0;
var TYPE_NEITHER = 1;
var TYPE_PURCHASE = 2;
var US_BANK_PHONE_NUMBER = 872265;
// Whether the script is being called by Tasker on an Android device, or it's being called on a PC
var onAndroid = (global("SDK") > 0);
@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 / 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 / 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 / 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>
__module_name__ = "Flashbang"
__module_version__ = "1.0"
__module_description__ = "Flash, aaahhhh"
__author__ = "cr5315"
import hexchat as hc
PENDING_COMMANDS = []
class Command(object):
@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
@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 / 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):