Skip to content

Instantly share code, notes, and snippets.

@iowillhoit
iowillhoit / github-toggle-dependabot.js
Created May 25, 2022 19:29
A bookmarklet to toggle the dependabot author on GitHub PR results
javascript:
var input = document.getElementById('js-issues-search');
var search = input.value;
var bot = '-author:app/dependabot';
var newSearch = search.includes(bot) ? search.replace(bot, '') : `${search} ${bot}`;
@iowillhoit
iowillhoit / copy-objects-in-workbench.js
Created November 30, 2021 21:39
Allows you to copy all of the GUS Objects in workbench so you can search them easier in a text editor
var objects = [...document.querySelectorAll('#QB_object_sel > option')].map(item => item.innerText); copy(objects);
@iowillhoit
iowillhoit / get-google-calendar-events.js
Last active January 8, 2024 20:44
This bookmarklet will copy all _visible_ meetings from Google calendar for the current day.
javascript:
var header = ":in:"; /* update if desired */
var splitOn = ", ";
/*
// This bookmarklet will copy all _visible_ meetings from Google calendar for the current day.
//
// Instructions:
// Navigate to your Google Calendar tab
# See https://github.com/SublimeLinter/SublimeLinter3/issues/178#issuecomment-228379181
view.show_popup('<style>html { background-color: #263238; margin: 0px; color: #839496; } body { background-color: #222B30; margin: 5px; border: none; font-size: 16px; color: #839496; } div { margin: 5px; word-wrap:break-word; line-height: 200%;} a { color: #2aa198; } .error_line { color: #839496; margin: 5px; } .bullet { color: #DDB700 }</style> <div><p class="error_line"><span class="bullet">•</span> ' + '</p><p class="error_line"><span class="bullet">•</span> '.join(line_errors) + '</p></div>',
location=-1,
max_width=700)
@iowillhoit
iowillhoit / map-right-option-key-to-delete-word.md
Last active May 9, 2016 17:08
Map right option key to delete word
  • Install Karabiner
  • Change the contents of ~/Library/Application Support/Karabiner/private.xml to:
<?xml version="1.0"?>
<root>
     <item>
        <name>Delete Word</name>
        <identifier>Delete Word</identifier>
        <autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::DELETE, ModifierFlag::OPTION_L</autogen>
 
@iowillhoit
iowillhoit / iterm2-key-bindings
Last active November 28, 2016 21:30
iTerm2 key bindings
Add in iTerm2 the following Profile Shortcut Keys
FOR ACTION SEND
⌘← "SEND HEX CODE" 0x01
⌘→ "SEND HEX CODE" 0x05
⌘del "SEND HEX CODE" 0x15
⌥← "SEND ESC SEQ" b
⌥→ "SEND ESC SEQ" f
⌥del "SEND HEX CODE" 0x1B 0x08
@iowillhoit
iowillhoit / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@iowillhoit
iowillhoit / snip-laravel_serviceProvider.sublime-snippet
Last active December 20, 2015 20:09
*Sublime Text Snippet* Laravel 4 Snippet: Service Provider
<snippet>
<content><![CDATA[
<?php namespace ${1:Your\Namespace};
use App;
use Illuminate\Support\ServiceProvider;
class ${2:providerName}Provider extends ServiceProvider{
${3:
public function register()
@iowillhoit
iowillhoit / uppercaseToCss
Created August 8, 2013 17:39
Changes uppercase sequences to lowercase and wraps in a span with the "text-transform:uppercase" style. This is helpful to lower your spam rating on email newsletters. Most spam filters don't like seeing ALL CAPS, because it's usually IS spam..
<?php
function replaceUpperCaseWithCss($matches){
$lower = strtolower($matches[0]);
return sprintf('<span style="text-transform:uppercase;">%s</span>', $lower);
}
function findUpperCaseSequences($text){
return preg_replace_callback("/[^a-z\ ]{2,}(\ [^a-z\ ]+)*\b/", "replaceUpperCaseWithCss", $text);
}
@iowillhoit
iowillhoit / phoneRegexExtension.txt
Created October 18, 2012 15:15
Phone Number Regex (country code, optional delimiters, optional extension)
^\(?([2-9]{3})\)?[\-. ]?([0-9]{3})[\-. ]?([0-9]{4})[\-. ]?(x|ext)?[\-. ]?([0-9]{3,4})?$