Skip to content

Instantly share code, notes, and snippets.

View Jakobud's full-sized avatar
🏠
Working from home

Jake Wilson Jakobud

🏠
Working from home
  • Fort Collins, Colorado
  • 09:55 (UTC -07:00)
  • LinkedIn in/jakobud
View GitHub Profile
# npx create-next-app@latest nextjs-dashboard --example "https://github.com/vercel/next-learn/tree/main/dashboard/starter-example"
@Jakobud
Jakobud / index.html
Last active May 20, 2021 05:35
Inline JS scripts when using deferred dependencies
<!-- Example: Load jQuery using defer -->
<script defer src="path/to/jquery.js"></script>
<!-- Inline script that waits for deferred jQuery to load before executing -->
<script>
window.addEventListener('DOMContentLoaded', function() {
(function($) {
// Put your custom code here
})(jQuery);
});
@Jakobud
Jakobud / gist:069c538d77667db61b67f7a17f349b12
Created May 10, 2020 21:01
SalesForce Commerce Cloud dump Object into JavaScript console in ISML
<script>console.log(JSON.parse('<isprint value="${JSON.stringify(someObject)}" encoding="jsonvalue"/>'));</script>
@Jakobud
Jakobud / Core.lua
Last active August 7, 2022 14:09
WOW Classic Addon Ace-3.0 Bootstrap
MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
MyAddon.version = "1.0"
local Console = LibStub("AceConsole-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("MyAddon")
-- Register slash command /myaddon
MyAddon:RegisterChatCommand("myaddon", "MyAddonCommand")
@Jakobud
Jakobud / client.conf
Last active October 13, 2020 00:21
OpenVPN PIA configuration
client
dev tun
proto udp
remote us-california.privateinternetaccess.com 1198
remote us-east.privateinternetaccess.com 1198
remote us-west.privateinternetaccess.com 1198
remote us-siliconvalley.privateinternetaccess.com 1198
remote us-texas.privateinternetaccess.com 1198
remote us-newyorkcity.privateinternetaccess.com 1198
remote us-midwest.privateinternetaccess.com 1198
@Jakobud
Jakobud / up.sh
Created December 28, 2017 18:39
OpenVPN auto-start Transmission Downloads
#!/bin/sh
echo "Starting Transmission Torrent Downloading"
transmission-remote --auth transmission:transmission --torrent all --start
@Jakobud
Jakobud / down.sh
Last active December 28, 2017 18:39
OpenVPN auto-stop Transmission downloads
#!/bin/sh
echo "Stopping Transmission Torrent Downloading"
transmission-remote --auth transmission:transmission --torrent all --stop
@Jakobud
Jakobud / _map-sort.scss
Last active June 20, 2022 14:50
Sort a SASS map
/// map-sort
/// Sort map by keys
/// @param $map - A SASS map
/// @returns A SASS map sorted by keys
/// @requires function list-sort
/// @author Jake Wilson <[email protected]>
@function map-sort($map) {
$keys: list-sort(map-keys($map));
$sortedMap: ();
@each $key in $keys {
@Jakobud
Jakobud / _list-sort.scss
Last active August 20, 2022 22:09
Sort a SASS list
/// list-sort
/// Sort a SASS list
/// @param $list - A SASS list
/// @returns A sorted SASS list
/// @requires function list-remove
/// @author Jake Wilson <[email protected]>
@function list-sort($list) {
$sortedlist: ();
@while length($list) > 0 {
$value: nth($list,1);
@Jakobud
Jakobud / _list-remove.scss
Created April 25, 2017 20:12
Removed an item for a SASS list based on it's index (mimics behavior of the native map-remove function)
/// list-remove
/// Remove an item from a list
/// @param $list - A SASS list
/// @param $index - The list index to remove
/// @returns A SASS list
/// @author Jake Wilson <[email protected]>
@function list-remove($list, $index) {
$newList: ();
@for $i from 1 through length($list) {
@if $i != $index {