Skip to content

Instantly share code, notes, and snippets.

View WebInspectInc's full-sized avatar
:shipit:
shippin' shippin' shippin'

Timothy Miller WebInspectInc

:shipit:
shippin' shippin' shippin'
View GitHub Profile
@WebInspectInc
WebInspectInc / keybase.md
Created March 21, 2019 22:12
keybase.md

Keybase proof

I hereby claim:

  • I am webinspectinc on github.
  • I am howlermiller (https://keybase.io/howlermiller) on keybase.
  • I have a public key ASAMGR1dZYix5uk9sNM4PFhFFDjRApZ6JgFM42HElDLpHAo

To claim this, I am signing this object:

@WebInspectInc
WebInspectInc / sublime-merge-commands.md
Last active December 24, 2023 06:29
Sublime Merge Commands

Sublime Merge Commands

Lots of commands available for keybindings in Sublime Merge. Not a comprehensive list, but a decent start.

  • exit_blame
  • exit_tree_mode
  • toggle_search
  • hide_command_status
  • hide_overlay
@WebInspectInc
WebInspectInc / docker-compose.yml
Created June 5, 2018 01:50
A basic Docker Compose file for WordPress
version: '3'
services:
mysql:
image: mysql:5.7
volumes:
- ./db:/docker-entrypoint-initdb.d
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress

If you think you want to add something to this documentation, then great! Kudos to you. Documenting your work is good.

But there are a few rules you'll have to follow. We aren’t trying to destroy your fun, but we have specific goals in mind for what should be here, and everything here has to fit those goals. This document should also be reviewed prior to reviewing pull requests that include documentation changes, so everyone is held accountable to these rules.

In a nutshell, all documentation should be (1) useful, (2) easy to read, and (3) easy to maintain. To be more specific:

  • Make sure whatever you're documenting will be used in the future. Not just a one-off thing that no one will touch again. If you aren't sure if it will be used again, just add a comment to your code rather adding documentation here.
  • Make sure anything you add here is grammatically correct. If you're pull requesting documentation, call out grammar errors or spelling errors.
  • For an easier reading experience, write documentation f
@WebInspectInc
WebInspectInc / just-use-sublime
Created February 26, 2015 19:18
An article by Andrew Ray that no longer exists. Used to live at http://delvarworld.github.io/
<header>
<h1 class="entry-title">Just Use Sublime Text</h1>
<p class="meta">
<time datetime="2013-03-16T19:06:00-07:00" pubdate="" data-updated="true">Mar 16<span>th</span>, 2013</time>
</p>
</header>
@WebInspectInc
WebInspectInc / cache_for_a_day.js
Last active August 29, 2015 14:15
JS localStorage basic caching for a day
// Usage: cache_for_a_day('data_id', <data>);
// If you only provide an ID, it gets
// If you provide both, it checks the date and returns cached data if it's been cached less than a day. Otherwise it sets the new data
function cache_for_a_day(id, data) {
var new_data = {};
var old_data = JSON.parse(localStorage.getItem(id));
if (old_data) {
var cache_date = new Date(old_data.cache_date);
@WebInspectInc
WebInspectInc / gist:7917047
Created December 11, 2013 19:43
Turn browser into a tiny code editor
Paste into your location bar:
data:text/html, <body oninput='e.firstChild.srcdoc=t2[v="value"]+"<script>"+t0[v]+"<\/script><style>"+t1[v]'onload='for(i=3;i--;)e.innerHTML+="<textarea id=t"+i+">"'id=e><iframe>
@WebInspectInc
WebInspectInc / .gitconfig
Last active March 4, 2018 04:00
My Git alias list
[alias]
st = status -s -b
cam = commit -a -m
oops = commit --amend
co = checkout
br = branch
unstash = stash pop
update = merge develop
howmany = rev-list HEAD --count
rdel = push origin --delete
@WebInspectInc
WebInspectInc / rAFAnimate.js
Last active December 27, 2015 00:18
Animation Delay with rAF
function animate (callback, time, oldTime) {
var oldTime = oldTime || new Date().getTime();
var now = new Date();
if (new Date(oldTime + time) < now) {
callback();
oldTime = now.getTime();
}
requestAnimationFrame(function() { animate(callback, time, oldTime); });
}
@WebInspectInc
WebInspectInc / keycodes.js
Last active April 27, 2022 14:29
Making keycodes easier in JS.
var KeyCode = {
backspace: 8
,tab: 9
,enter: 13
,shift: 16
,ctrl: 17
,alt: 18
,pause: 19
,capsLock: 20
,escape: 27