Skip to content

Instantly share code, notes, and snippets.

@cr5315
cr5315 / config.py
Created Jun 24, 2017
Instagram Follower Count
View config.py
# 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 Mar 24, 2016
Tasker script to calculate bank balance from SMS messages
View usbank.js
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);
View 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 Dec 17, 2015
Simple MVP Example
View MainActivity.java
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 Jan 1, 2015
Python script to auto cherry-pick changes, reads from files that have a .cp extension
View cherry-pick.py
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 Oct 25, 2014
Material palettes for Android colors.xml
View 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>
View flashbang.py
__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 Aug 29, 2015
Sort addresses from vanitygen into folders with the address/privkey in a text file and a QR code
View vanitygen-sort.py
# 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 Aug 29, 2015
Updated with more invalid file checking
View chromecast.py
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 Aug 29, 2015
hardc0re left for a few days. So I made these.
View hardcore-address.py
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):