Skip to content

Instantly share code, notes, and snippets.

View grand-lotus-iroh's full-sized avatar

Uncle Iroh grand-lotus-iroh

View GitHub Profile
@grand-lotus-iroh
grand-lotus-iroh / bookmarklet-get-original-URL-StumbleUpon.js
Last active March 9, 2018 04:32
open stumbleupon links outside of frame - you'll want to create a new bookmarklet in your browser bookmark toolbar and just copy / paste the below code snippet
// (R) click Bookmarks Toolbar
// New Bookmark
// Copy / Paste into Location
// Click Add
// minified version
javascript:(function()%7Bwindow.open(document.getElementsByClassName('stumble-frame')%5B0%5D.src%2C%20'_blank')%7D)()
// pretty version
@grand-lotus-iroh
grand-lotus-iroh / submit-form-outside-button.html
Created March 8, 2018 19:57
Submit form using a button outside the <form> tag
<form method="get" action="something.php">
<input type="text" name="name" />
<input type="submit" id="submit-form" class="hidden" />
</form>
<label for="submit-form" tabindex="0">Submit</label>
https://stackoverflow.com/a/23456905
@grand-lotus-iroh
grand-lotus-iroh / wp-config.php
Created March 7, 2018 01:12
broken (or blank) wordpress customizer solution
define('CONCATENATE_SCRIPTS', false);
/* That's all, stop editing! Happy blogging. */
@grand-lotus-iroh
grand-lotus-iroh / quick-compose-email-hotkey.ahk
Last active February 27, 2018 15:08
Quick Compose Shortcut OR Global Compose Email Hotkey / Shortcut
; CTRL + ` - Compose Email
^`::
Run mailto:
Return
; This is a simple and generic example of an AutoHotkey script to compose an
; email using default email program when you press a keyboard shortcut. WIN + R
; to run command and type shell:startup than paste .ahk into startup folder
; [1]: http://www.autohotkey.com/docs/Hotkeys.htm
@grand-lotus-iroh
grand-lotus-iroh / VideoBlocker.json
Created February 27, 2018 14:37
Video Blocker: Import / Export list to remove alot of YouTube junk...
[{"key":"selena gomez","type":"keyword"},{"key":"fergie","type":"keyword"},{"key":"beyonce","type":"keyword"},{"key":"black panther","type":"keyword"},{"key":"fortnite","type":"keyword"},{"key":"family guy","type":"keyword"},{"key":"prom dresses","type":"keyword"},{"key":"Leon Lush","type":"channel"},{"key":"LadyGagaVEVO","type":"channel"},{"key":"Vanity Fair","type":"channel"},{"key":"PinkVEVO","type":"channel"},{"key":"E! Live from the Red Carpet","type":"channel"},{"key":"Donald J. Trump Topic","type":"channel"},{"key":"Bad Lip Reading","type":"channel"},{"key":"TMZ","type":"channel"},{"key":"TheEllenShow","type":"channel"},{"key":"KatyPerryVEVO","type":"channel"},{"key":"TaylorSwiftVEVO","type":"channel"},{"key":"LastWeekTonight","type":"channel"},{"key":"CNN","type":"channel"},{"key":"Team Coco","type":"channel"},{"key":"The Young Turks","type":"channel"},{"key":"Last Week Tonight Season 4","type":"channel"},{"key":"Real Time with Bill Maher","type":"channel"},{"key":"Saturday Night Live","type":"channel
@grand-lotus-iroh
grand-lotus-iroh / .htaccess
Last active February 19, 2018 09:41
Powerful .htaccess snippets that require RewriteEngine On at the very top
# Default force to HTTPS for all traffic
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Force SSL / HTTPS Redirection v2
Options +FollowSymLinks
Options -Indexes
Options -MultiViews
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@grand-lotus-iroh
grand-lotus-iroh / bootstrap modal html5 video.html
Created February 16, 2018 22:51
Bootstrap 3 Modal with HTML5 video
<div class="btn-group">
<button class="btn btn-link" data-target="#modal-sample" data-toggle="modal" type="button">90 second video tutorial</button>
</div>
<div aria-hidden="true" aria-labelledby="modal-sample-label" class="modal theme-alt modal-center-vertical" id="modal-sample" role="dialog" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="modal-sample-label">Dialog title</h4>
</div>
<div class="modal-body">
@grand-lotus-iroh
grand-lotus-iroh / force-gist-github-embed-links-open-new-tab.js
Last active February 16, 2018 22:04
Force Open New Tab Gist Github Footer / Meta Links - Child Theme wp_enqueue_script Function
@grand-lotus-iroh
grand-lotus-iroh / autoplay-modal-html5-video-spacebar-pause.js
Created February 16, 2018 21:30
Autoplay HTML5 Video with Modal and Keyboard Support
<script type="text/javascript">
$('#modal-sample').on('shown.bs.modal', function() {
$('#video1')[0].play();
})
$('#modal-sample').on('hidden.bs.modal', function() {
$('#video1')[0].pause();
})
$(window).keypress(function(e) {
var video = document.getElementById("video1");
if (e.which == 32) {
@grand-lotus-iroh
grand-lotus-iroh / suspended.html
Created September 26, 2017 21:13
Reset FTP Password in cPanel
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Account Suspended</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">