Skip to content

Instantly share code, notes, and snippets.

View Scub3d's full-sized avatar
💭
Feeling Clean

Spenser Solys Scub3d

💭
Feeling Clean
View GitHub Profile
@Scub3d
Scub3d / lcu_websocket.js
Created January 7, 2019 22:31
Nodejs script that allows the user to access the websocket stream of the lcu. Works assuming the League of Legends client is running on the computer
const websocket = require("ws");
const { exec } = require("child_process");
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
exec('WMIC PROCESS get Caption,Commandline', {maxBuffer: 1024 * 500}, (err, stdout, stderr) => {
if(err) {
console.log(err);
return;
}
@Scub3d
Scub3d / lolesports_ws.py
Created December 11, 2018 05:38
Python code that gets and records the LoL Esports websocket data
# -*- coding: utf-8 -*-
import websocket, thread, time, requests, json
from firebase import firebase
# I use firebase to store everything, but it can be adpated to work with other stuff
firebaseURL = '<your firebase database (not firestore) url here>'
firebase = firebase.FirebaseApplication(firebaseURL, authentication=None)
def getStreamToken():
r = requests.get("http://api.lolesports.com/api/issueToken")
@Scub3d
Scub3d / AssetBundler.cs
Created September 18, 2018 21:00
Place inside your Unity projects Asset folder, as such: Assets -> Scripts -> Editor. Allows you to easily mark assets to be bundled
using UnityEngine;
using UnityEditor;
using System.IO;
public class AssetBundler : Editor {
[MenuItem("Assets/Build AssetBundles")]
static void BuildAllAssetBundles() {
string exportPath = ASSET_BUNDLE_OUTPUT_PATH; // Change to fit your needs
BuildPipeline.BuildAssetBundles(exportPath, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.StandaloneWindows64); // Change Options to fit your needs
@Scub3d
Scub3d / Main.sublime-menu
Last active May 28, 2018 06:58
Sublime Test Plugin Webserver
[
{
"id" : "how",
"caption" : "But ... How",
"children": [{
"caption" : "Never mind, just get it over with",
"command" : "startserver"
}, {
"caption" : "Duplicate",
"command" : "duplicate"
@Scub3d
Scub3d / index.js
Created May 25, 2018 09:50
Allows Firebase to create a new GitHub issue when a new Crashlytics Issue occurs. WIP
// Put this file/code in your functions/index.js file
const functions = require('firebase-functions');
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
const OWNER_USERNAME = "<github_username>";
const REPO_NAME = "<github_repo_name>";
const ACCESS_TOKEN = "<github_personal_access_token>";
exports.newIssue = functions.crashlytics.issue().onNew(issue => {
@Scub3d
Scub3d / getHackathons.py
Created March 8, 2018 01:59
mlh.io hackathon scraper
import sys, os, uuid
from urllib.request import urlopen, Request
from bs4 import BeautifulSoup
from dateutil.parser import parse
def decodeEmail(e):
de = ""
k = int(e[:2], 16)
for i in range(2, len(e) - 1, 2):
de += chr(int(e[i:i+2], 16)^k)
@Scub3d
Scub3d / ExampleUsage.java
Created February 27, 2018 20:18
Android Requests Implementation
// YOUR PACKAGE
import org.json.JSONException;
import org.json.JSONObject;
/**
* Created by scub3d on 11/01/18.
*/
public class ExampleUsage implements HandleResponseInterface {
private void uploadExample() {
@Scub3d
Scub3d / api-lolesports-com_docs.md
Last active March 4, 2020 19:49 — forked from brcooley/api-lolesports-com_docs.md
lolesports.com unofficial api docs