Skip to content

Instantly share code, notes, and snippets.

View clarkio's full-sized avatar
🎷
Cool Jazz

Brian Clark clarkio

🎷
Cool Jazz
View GitHub Profile
@clarkio
clarkio / CSP Harlem Shake Test Instructions.txt
Last active June 5, 2024 21:25
Test script to paste in dev tools console that demonstrates how a CSP can help
// Originally provided here: http://pastebin.com/aJna4paJ
1. Go to Google Chrome
2. Go to any website (works cool on facebook)
3. Right click anywhere -> Inspect Element
4. Click on the rightmost "Console" tab.
5. Copy paste the following * into the console.
6. Make sure the volume isn't too loud!
7. Press Enter.
8. If the audio doesn't play and/or elements on the page don't move then the site has properly implemented a CSP
@elklein96
elklein96 / .zshrc
Last active October 25, 2017 16:13
Zsh Config
# Path to Oh-My-Zsh installation
export ZSH=/Users/evanklein/.oh-my-zsh
# Plugins
plugins=(git)
source $ZSH/oh-my-zsh.sh
# Configure prompt
export ZSH_THEME_GIT_PROMPT_PREFIX="[git:"

⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals

alexcvzz.vscode-sqlite
andys8.jest-snippets
apollographql.vscode-apollo
austincummings.razor-plus
bobsparadox.seti-black
BriteSnow.vscode-toggle-quotes
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer
dbaeumer.vscode-eslint
@sindresorhus
sindresorhus / esm-package.md
Last active July 6, 2024 14:31
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.