Skip to content

Instantly share code, notes, and snippets.

View psiie's full-sized avatar

Brooke Indigo psiie

  • Sinclair Digital
  • Seattle, WA
View GitHub Profile
@psiie
psiie / Original_Function.js
Created May 3, 2019 21:23
Get the original function in javascript. useful if someone has replaced the function or you must guarantee that it is clean.
function _Function(path) {
let fn = () => {};
const split = path.split('.');
const $iframe = document.createElement('iframe');
$iframe.src = 'about:blank';
document.body.appendChild($iframe);
fn = $iframe.contentWindow;
for (let i=0; i<split.length; i++) {
@psiie
psiie / darktheme.js
Created September 20, 2017 04:32
iPad Dark Theme for WebHub Userscript
// ==UserScript==
// @name iPad Dark Theme
// @namespace Darkenvy
// @version 0.1
// @description Makes the web dark
// @author Darkenvy
// @match http://*/*
// @match https://*/*
// @grant none
// ==/UserScript==
bvs1ness
serv1ces
pr0dvcts
s0ftware
research
c0mments
nat10nal
1nternet
sh1pp1ng
reserved
@psiie
psiie / fake-sd-check.sh
Created July 8, 2017 21:41
Test Fake SD Cards using DD and PV.
if [ ! $1 ] || [ ! $2 ]
then
echo "---------------------------------------"
echo "WARNING. Will write to drive"
echo ""
echo "Command Syntax: ./fake-sd-check DRIVE GB-SIZE"
echo " example: ./fake-sd-check /dev/disk3 32"
echo "---------------------------------------"
exit
fi
@psiie
psiie / ffmpeg-convert.py
Last active May 29, 2017 07:23
Converting videos using python and FFMPEG
import os, subprocess
inDir = 'ka-lite-en/content/'
outDir = 'ka-lite-en-converted/content/'
ffmpeg = [
"ffmpeg",
"-i",
"in.mp4",
"-r",
"15",
@psiie
psiie / install_node.sh
Created March 20, 2017 01:22
Install NodeJS on Raspberry Pi
#! /bin/bash
#Created by Reno McKenzie (darkenvy)
wget https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-armv6l.tar.xz
tar xf node-v6.9.5-linux-armv6l.tar.xz
cd node-v6.9.5-linux-armv6l
sudo cp -R * /usr/local/
ln -s /usr/local/bin/node /usr/sbin/node
ln -s /usr/local/bin/npm /usr/sbin/npm