Skip to content

Instantly share code, notes, and snippets.

View jimmynotjim's full-sized avatar
☀️
Enjoying SoCal "Fall"

Jimmy Wilson jimmynotjim

☀️
Enjoying SoCal "Fall"
View GitHub Profile
@osartun
osartun / coderPadTSTestUtils.ts
Last active March 22, 2024 22:46
Test utilities for TypeScript pads on CoderPad
/**
* You want to use mocha in a TypeScript CoderPad but you get the error
* message that `describe` isn't defined even though you're already using
* the `mocha.suite.emit('pre-require', this, 'solution', mocha)` hack?
*
* > Cannot find name 'describe'. Do you need to install type definitions
* > for a test runner? Try `npm i --save-dev @types/jest` or
* > `npm i --save-dev @types/mocha`.
*
* Here are a couple of lines to copy & paste into your pad to use
@cliss
cliss / Brewfile
Last active September 2, 2023 06:50
Casey Liss's Brewfile, as of 31 October 2021
cask_args appdir: "/Applications"
tap "homebrew/cask-fonts"
brew "mas"
#### LAPTOPS ####
#cask "tripmode"
#### LAPTOPS ####
mas "Boop", id: 1518425043
@jayphelps
jayphelps / package.json
Last active March 20, 2024 09:41
TypeScript output es2015, esm (ES Modules), CJS, UMD, UMD + Min + Gzip. Assumes you install typescript (tsc), rollup, uglifyjs either globally or included as devDependencies
{
"scripts": {
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js",
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz",
}
}
@ascott1
ascott1 / tinfoil.md
Last active February 25, 2019 13:31
The levels of internet privacy

These are some steps that users can take to retain privacy online. These aren't perfect, but aim to strike a balance between privacy and usability.

Level 1

  • Enable Do Not Track in your browser
  • Use a tracker blocking plugin such as Privacy Badger or Ghostery
  • Disable third-party cookies
  • Use the HTTPS Everywhere browser extension
@mkivikoski
mkivikoski / ideal-employment.md
Last active September 20, 2016 14:36
A checklist of the qualities you'd like to see your next company have.

We write resumes to convince employers to hire us. What if we created a list for what we were looking for in our next employer and their environment?

This allows both sides to cut through the game of telephone, establish what you are looking for in your role, and define the type of organization you're looking to work for. Fork, modify and add this checklist to your portfolio site to quicken the pace of getting through companies that don't match your criteria.

--

@mvaneijgen
mvaneijgen / material-theme.terminal
Created June 15, 2015 20:27
material-theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active March 26, 2024 08:15
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox
@cferdinandi
cferdinandi / extend.js
Last active August 17, 2023 23:26
A native JS extend() function.
/**
* Merge defaults with user options
* @private
* @param {Object} defaults Default settings
* @param {Object} options User options
* @returns {Object} Merged values of defaults and options
*/
var extend = function ( defaults, options ) {
var extended = {};
var prop;
@germanny
germanny / shortcode-include-file.php
Last active September 30, 2022 12:37
Shortcode to include files in WP Pages
<?php
// SHORTCODE - Include File
// http://www.amberpanther.com/knowledge-base/using-the-wordpress-shortcode-api-to-include-an-external-file-in-the-post-content/
function include_file($atts) {
//check the input and override the default filepath NULL
//if filepath was specified
extract(shortcode_atts(array('filepath' => 'NULL'), $atts));
//check if the filepath was specified and if the file exists
if ($filepath!='NULL' && file_exists(CHILD_SS_DIR.$filepath)){