Skip to content

Instantly share code, notes, and snippets.

View TristanWiley's full-sized avatar

Tristan Wiley TristanWiley

View GitHub Profile
["☹️","☺️","⚽","❣️","❤️","❤️‍🔥","❤️‍🩹","🆒","🌈","🌞","🌟","🌱","🌹","🍀","🍻","🍾","🎂","🎆","🎈","🎉","🎊","🎶","🐙","🐢","👀","👻","💋","💎","💓","💔","💕","💖","💗","💙","💚","💛","💜","💞","💥","💩","💫","💯","💸","🔔","🔥","🖤","😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐","😑","😒","😓","😔","😕","😖","😘","😚","😛","😜","😝","😞","😠","😡","😢","😣","😤","😥","😩","😪","😫","😬","😭","😱","😳","😴","😵‍💫","😶","🙂","🙃","🙄","🙈","🙉","🙊","🚀","🚨","🛎️","🤍","🤎","🤑","🤔","🤗","🤠","🤣","🤤","🤨","🤩","🤪","🤫","🤭","🤯","🥰","🥱","🥲","🥳","🥹","🥺","🦀","🦋","🧡","🫠","🫡","🫢","©️","®️","⁉️","™️","☀️","☁️","☂️","☃️","☄️","☎️","☑️","☔","☕","☘️","☠️","☮️","☯️","☹️","☺️","♈","♉","♊","♋","♌","♍","♎","♏","♐","♑","♒","♓","♟️","♠️","♥️","♻️","♾️","⚓","⚖️","⚠️","⚡","⚽","⚾","⛄","⛅","⛈️","⛎","⛓️","⛱️","⛳","⛴️","⛵","⛸️","⛺","✅","✈️","✉️","✏️","✒️","✔️","✖️","✨","❄️","❓","❔","❕","❗","❣️","❤️","❤️‍🔥","❤️‍🩹","➕","➖","➗","➰","➿","⭐","〰️","🀄","🃏","🅰️","🅱️","🅾️","🆎","🆑","🆒","🆓","🆕","🆗","🆘","🆙","🌀","🌂","🌃","🌄","🌅","🌆","🌇","🌈","🌊","🌋","🌍","🌎","🌏","🌐","🌑","🌒","🌓","🌔","🌕","🌖","🌗","🌘","🌙","🌚","🌛
var input = document.getElementsByTagName("pre")[0].innerText.split("\n").filter(e => e !== "");
var previous = 100000000;
var increased = 0;
input.forEach(line => {
var val = parseInt(line);
if (val > previous) {
increased++;
}
10-11 11:09:52.241 4460 4460 E AndroidRuntime: FATAL EXCEPTION: main
10-11 11:09:52.241 4460 4460 E AndroidRuntime: Process: org.mhacks.app, PID: 4460
10-11 11:09:52.241 4460 4460 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.mhacks.app/org.mhacks.app.signin.ui.SignInActivity}: java.lang.ClassNotFoundException: Didn't find class "org.mhacks.app.signin.ui.SignInActivity" on path: DexPathList[[zip file "/data/app/org.mhacks.app-C2bWY9LdwONl27HTKNPUmg==/base.apk"],nativeLibraryDirectories=[/data/app/org.mhacks.app-C2bWY9LdwONl27HTKNPUmg==/lib/arm64, /system/lib64, /product/lib64]]
10-11 11:09:52.241 4460 4460 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3194)
10-11 11:09:52.241 4460 4460 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
10-11 11:09:52.241 4460 4460 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(L
@TristanWiley
TristanWiley / se-chat-trash.js
Last active March 12, 2019 20:42
Add "move to trash" to the StackOverflow/StackExchange chat rooms. Only works for room owners.
const trashBinId = '23262'
function moveToTrash(el) {
const messageId = el.parentElement.parentElement.id.split('-')[1]
const formData = new FormData();
formData.append('ids', messageId);
formData.append('to', trashBinId);
formData.append('fkey', fkey().fkey);
@TristanWiley
TristanWiley / music-slack.js
Last active March 9, 2019 22:44
Script that updates Slack status with what you're currently listening to on Google Play Music
let currentSongTitle = ""
let currentSongPart = 0
let songLength = ''
const token = ""
const target = document.querySelector('#player')
const observer = new WebKitMutationObserver(() => {
const currentlyPlayingTitle = document.getElementById('currently-playing-title')
if (!currentlyPlayingTitle) return
const newSongTitle = currentlyPlayingTitle.innerText

Keybase proof

I hereby claim:

  • I am tristanwiley on github.
  • I am sirhype (https://keybase.io/sirhype) on keybase.
  • I have a public key ASCXog3JMrr_gOZles8EndqR5yJf4l4WW6-C-JoYGSHkpgo

To claim this, I am signing this object:

var newButton = document.querySelector("._3-8_._4jy0._4jy4._517h._51sy._42ft");
var questions = [];
for(var i = 0; i<=1000; i++){
var text = document.querySelector("._64n_._3-8y").innerHTML;
if(!questions.includes(text)){
questions.push(text);
}
newButton.click();
}
@TristanWiley
TristanWiley / meals.js
Last active November 16, 2017 16:08
A script to tell me how much Moes/Guac and Roll I've eaten. Run on CBord's GET summary page. Select "meals". https://get.cbord.com/myubcard/full/history.php
var resturants = [];
var totals = {};
$('.scrollContent tr').each(function( index ) {
var resturant = $(this).find(".activity_details").text();
if(resturant == "XML Interface - Meal Plan Sele") return;
if(totals[resturant]){
totals[resturant]++;
}else{
totals[resturant] = 1;
var friendsElems = document.querySelectorAll('[data-sigil=undoable-action]');
var friends = []
for(var i = 0; i<friendsElems.length; i++){
var elem = friendsElems[i];
var innerElem = elem.children[1].children[0];
var name = innerElem.children[0].children[0].innerText
var json = innerElem.children[innerElem.children.length-1].children[0].children[0].dataset.store
var id = JSON.parse(json).id;
494530
265871 e
207377 a
201480 t
193465 o
170579 n
164532 r
155420 i
134537 s
116982 l