Skip to content

Instantly share code, notes, and snippets.

View kidGodzilla's full-sized avatar
👋
Working from home forever

James Futhey kidGodzilla

👋
Working from home forever
View GitHub Profile
@kidGodzilla
kidGodzilla / embed-widget.html
Last active March 11, 2021 21:20
Embed Indie.am Widget Example
<!-- indie.am Player Embed Script -->
<script>
window._indieam_username = 'james'; // Change this to your own log ID, typically indie.am/<log_id>
document.querySelector('head').innerHTML += '<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cleanslate"><style>#indieam_container{position:fixed!important;padding:18px 20px!important;bottom:0!important;left:0!important;z-index:999999999999!important}.indieam_circle{cursor:pointer!important}.indieam_circle>img{width:65px!important;height:65px!important;border-radius:50%!important;box-shadow:1px 2px 22px #00000044!important}#indieam_container>iframe{position:fixed!important;bottom:-88px!important;left:-27px!important;transform-origin:0 0!important;transform:scale(.8)!important;height:750px!important;width:500px!important;display:none!important}#indieam_container>iframe.indieam_in{display:block!important}#indieam_container,#indieam_container iframe { overflow-y: hidden !important }</style>';
function _indieam_toggl
@kidGodzilla
kidGodzilla / custom-embed.html
Created February 11, 2021 06:17
Create a custom Indie.am Blog Embed
<!-- I've created an example you can peek at here: -->
<!-- https://jamesfuthey.com/audiolog -->
<script>
// First, set your Log ID (typically indie.am/<log_id>
window.logId = 'james';
// Now, we fetch data, and print our logs on our current page
fetchData(function () {
// This will output a new array of entries at window.sounds
/**
* @api {get} /freemail/:email isFreeMail
* @apiDescription Tests a domain to see if it's a free email or disposible email address
* @apiGroup Utility
* @apiExample {REST} Example usage:
GET https://api.meetingroom365.com/freemail/[email protected]
* @apiParam {String} email The email address you wish to check
* @apiVersion 0.5.0
* @apiSuccessExample {json} Success
*HTTP/1.1 200 OK
@kidGodzilla
kidGodzilla / dokku_on_digital_ocean.md
Created October 25, 2020 06:43 — forked from henrik/dokku_on_digital_ocean.md
Notes from running Dokku on Digital Ocean.

My notes for Dokku on Digital Ocean.

These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)

ssh henroku dokku

@kidGodzilla
kidGodzilla / random-name.js
Created November 12, 2018 00:07
Generate a random name in adj-noun format as a placeholder (aquatic ninja, calculating banjo, etc.)
function randomName () {
var adjectives = "aback,abaft,abandoned,abashed,aberrant,abhorrent,abiding,abject,ablaze,able,abnormal,aboard,aboriginal,abortive,abounding,abrasive,abrupt,absent,absorbed,absorbing,abstracted,absurd,abundant,abusive,acceptable,accessible,accidental,accurate,acid,acidic,acoustic,acrid,actually,adHoc,adamant,adaptable,addicted,adhesive,adjoining,adorable,adventurous,afraid,aggressive,agonizing,agreeable,ahead,ajar,alcoholic,alert,alike,alive,alleged,alluring,aloof,amazing,ambiguous,ambitious,amuck,amused,amusing,ancient,angry,animated,annoyed,annoying,anxious,apathetic,aquatic,aromatic,arrogant,ashamed,aspiring,assorted,astonishing,attractive,auspicious,automatic,available,average,awake,aware,awesome,awful,axiomatic,bad,barbarous,bashful,bawdy,beautiful,befitting,belligerent,beneficial,bent,berserk,best,better,bewildered,big,billowy,bite-Sized,bitter,bizarre,black,black-And-White,bloody,blue,blue-Eyed,blushing,boiling,boorish,bored,boring,bouncy,boundless,brainy,brash,brave,brawny,
@kidGodzilla
kidGodzilla / hide-idle-cursor.js
Last active December 20, 2021 21:46
Hide Idle Cursor until mousemove after 5s delay
/**
* jQuery
*/
$(function () {
$(document).mousemove(function () {
$('html, body').css({ cursor: 'default' });
clearTimeout(window.__ttimer);
window.__ttimer = setTimeout(function () {
$('html, body').css({ cursor: 'none' });
@kidGodzilla
kidGodzilla / alphanumeric-lookup.js
Last active August 14, 2017 20:04
Generates an Alphabetic or Alphanumeric index lookup
// Build an alphabetic / alphanumeric index lookup
// Scales three characters deep
// Should work for any int up to i = 143,364 when alphabetic (object-safe keys) Math.pow(s.length, 3) + Math.pow(s.length, 2) + s.length
// This can be scaled further by extending s to include digits, characters, etc. (242,234 if alphanumeric)
function generateLookup (length) {
var s = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; // Alphabetic
// var s = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; // Alphanumeric
var lookup = [];
@kidGodzilla
kidGodzilla / mailthisto-ajax-example.js
Last active April 26, 2023 19:57
MailThis.to Ajax Example
// The following example POSTS data to mailthis.to, redirects the user to a confirmation page, and then sends an email (upon the successful completion of Recaptcha verification)
$.post('https://mailthis.to/[email protected]', {
email: '[email protected]',
_subject: 'hi!',
message: 'Test'
}).then(function () {
location.href = 'https://mailthis.to/confirm'
});
@kidGodzilla
kidGodzilla / mailthisto-example.html
Last active September 11, 2023 08:00
Mailthis.to Example
<form action="https://mailthis.to/example" method="POST" encType="multipart/form-data">
<h3>Contact Form (example)</h3>
<!-- Name -->
<input type="email" name="name" placeholder="Your name">
<!-- Email -->
<input type="email" name="email" placeholder="[email protected]">
<!-- Phone Number -->
<input type="text" name="phone" placeholder="+1 (255) 555-5555">
<!-- Textarea (Message) -->
<textarea name="message" placeholder="Enter your message here" style="height:90px"></textarea>
$('img').each(function () {
var w = $(this).width();
var h = $(this).height();
var nw = $(this).prop('naturalWidth');
var nh = $(this).prop('naturalHeight');
var s = $(this).attr('src') || $(this).attr('_src');
if (s.indexOf('://') === -1) {
var pn = location.pathname;
pn = pn.split('/');