Skip to content

Instantly share code, notes, and snippets.

@Wowfunhappy
Wowfunhappy / gist:372a63a00d10847674346dd3dd385a3c
Last active July 12, 2018 18:56
I save all my super secret thievery information in a plain text file on my computer. Once you've logged in, enter this command.
nano ~/secret-thief-info.txt
// ==UserScript==
// @name AMP Removal from Google Search Results
// @namespace http
// @description Attempts to remove AMP related attributes from Google search results so that you're not redirected to an AMP page in the first place
// @include *://*google*/search*
// @run-at document-end
// @grant none
// @version 1.4.1-Wowfunhappy3
//
//
@Wowfunhappy
Wowfunhappy / podcast-downloader.sh
Created July 14, 2019 21:05
Podcast Downloader
#!/bin/bash
#
#
# Description: A simple bash script to download most recent media from a podcast XML feed
#
# Usage: sh podcast-download.sh http://myfeed.com/rss /PATH/TO/folder
#
# Based on script by Andrew Morton: https://github.com/mortocks/bash-podcast-download
# Heavily modified by Wowfunhappy
#
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\0000\PowerSettings]
"ConservationIdleTime"=hex:ff,ff,ff,ff
"PerformanceIdleTime"=hex:ff,ff,ff,ff
"IdlePowerState"=hex:00,00,00,00
@Wowfunhappy
Wowfunhappy / index.html
Last active September 13, 2019 17:11
Pebble RSS Reader Settings
<!DOCTYPE html>
<html>
<head>
<title>Pebble RSS Reader Configuration</title>
</head>
<body>
<div id="allFeedForms">
<h3>RSS Feeds</h3>
</div>
@Wowfunhappy
Wowfunhappy / app.js
Created October 1, 2019 19:21
Pebble: Create Timeline Pins When It Will Rain with DarkSky API
var darkSkyApiKey = ""
/*
In theory (untested), this app should work once you (1) add an api key from dark sky and (2) replace the three fantasy functions with real code.
*/
var UI = require('ui');
var ajax = require('ajax');
var blackStatusBar = {
@Wowfunhappy
Wowfunhappy / proxy.php
Last active July 13, 2020 21:58 — forked from iovar/proxy.php
Simple PHP Proxy Script
<?
/**
* A simple PHP proxy.
* Based on https://gist.github.com/iovar/9091078
* Modified by Wowfunhappy
*
* Usage: http://path/to/proxy.php?example.com
*/
addEventListener('fetch', event => {
event.respondWith(forwardRequest(event.request));
})
async function forwardRequest(req) {
var url = getURLFromRequest(req);
var init = {
method: req.method,
headers: req.headers,
body: req.body,
//todo: handle root relative URLS. Pass in request to URLFixer and let it handle sub-functions.
addEventListener('fetch', event => {
event.respondWith(forwardRequest(event.request));
})
async function forwardRequest(req) {
var inputURL = getInputURLFromRequest(req);
var init = {
method: req.method,
@Wowfunhappy
Wowfunhappy / patches.diff
Created August 24, 2020 20:18
Docker Machine + VMWare Fusion on Mavericks
1. Reset Macports tree to revision 9bbc6e46bc525b714dbea0d10970f29f18bcc7de
2. sudo port install Docker
3. Edit Docker-Machine port file, change version to 0.16.2 and update checksums and size to match, taking from https://github.com/macports/macports-ports/blob/c534c086278121e3f558490cb1baeb011162c93d/devel/docker-machine/Portfile
4. Add in below diff patches. Removes the error checking that actually just ends up breaking everything, see: https://github.com/docker/machine/issues/4479#issuecomment-464355478. Also disables suspend in vmware because that screws up stuff.
5. Install docker-machine, save build docker-machine and docker binaries.