Skip to content

Instantly share code, notes, and snippets.

View wtfaremyinitials's full-sized avatar

Will Franzen wtfaremyinitials

View GitHub Profile
#include <iostream>
#include <iomanip>
using namespace std;
/*
0: 50
1: 54
3: 57
6: 59
62: 61
@wtfaremyinitials
wtfaremyinitials / pip.js
Created October 12, 2016 23:29
Open any video in picture-in-picture mode on Safari 10
document.querySelector('video').webkitSetPresentationMode('picture-in-picture')
_.
_/=\:<
.#/*let}
//as\@#:~/
try()|:-./
*~let:>@{#
<\>}#@~*/
(+!:~/+/
/={+|
_.:+*as=._ _.]@~let[._
@wtfaremyinitials
wtfaremyinitials / osx-console-login.sh
Last active August 16, 2016 18:47
Enable the ">console" username on OSX/macOS
sudo defaults write /Library/Preferences/com.apple.loginwindow.plist "DisableConsoleAccess" NO
@wtfaremyinitials
wtfaremyinitials / blog-fix-googledrive.md
Last active August 8, 2016 18:27
Fix Orphaned Google Drive Folders

Recently my school cleared my Google Drive for the coming school year and moved the old folders to an archive folder. Unfortunately this archive folder doesn't show up in Google Drive's main list of files because it's an orphan. Currently it can only be accessed via search.

The following script will manually add a parent to any Google Drive folder, even orphaned ones. How to use it:

  • Navigate to the folder you would like to add a parent to. Copy the ID of the folder in the URL. (28 random letters and numbers)
@wtfaremyinitials
wtfaremyinitials / fixdrive.gs
Created July 27, 2016 03:22
Google Drive fix
// School created an archive folder of last years stuff, but finding that
// folder required searching for it. This made the archive accessible.
// This can also be used to put a single file in multiple folders
function fixDrive() {
var root = DriveApp.getRootFolder()
var archive = DriveApp.getFolderById("[snip]")
root.addFolder(archive)
}
@wtfaremyinitials
wtfaremyinitials / id_rsa.pub
Created July 25, 2016 00:50
SSH Auth public key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCXn1819eun6KxXJLDH8gg8mFdvljMieOKLluK6J9jw7egqJo54FN4EEIuc1pMukQe3xEV8wPy09/HW3gmzFNUzviO75hU/zqpBkVQo0YCIvAZbs397UUSUcBVOfAdCRoqhkj5fnZ2ZOkQMbiWf+tK4Xj3ueenxyhaQ+DwTZeaxLCjHH+bDvRHVDxVIITZ4T6R9SBArUOjb+FDucyU2o/B+BrMdH8HxymNF4HHc8Vv61o7kxxUPx2pXiJGYI+bIPsdmpi7Amcx80bcfO2z+aRu4e4cFsbL1fEmQYoTVAtGwgsJWKbUqvAFry5qujuKA9ovMgDhMVQp+Ft+/ImuOx7PP
@wtfaremyinitials
wtfaremyinitials / darkmode.js
Created July 17, 2016 15:56
Hack dark mode into websites
function handleProp(node, prop) {
var color = window.getComputedStyle(node)[prop];
if(color == "rgba(0, 0, 0, 0)")
return;
color = color.match(/rgba?\((\d+), (\d+), (\d+)/).splice(1,3);
if(color[0] == color[1] && color[1] == color[2]) {
node.style[prop] = "rgb(" + (256-color[0]) + ", " + (256-color[1]) + ", " + (256-color[2]) + ")";
}
}
@wtfaremyinitials
wtfaremyinitials / keybase.md
Created July 11, 2016 20:47
Keybase Verification

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@wtfaremyinitials
wtfaremyinitials / autorun.sh
Created June 8, 2016 04:34
Transcend WiFi SD Card telnet
telnetd -l /bin/sh &