Skip to content

Instantly share code, notes, and snippets.

@zaydek-old
zaydek-old / bookmark.min.js
Last active May 28, 2024 19:18
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@tjbenton
tjbenton / virtualbox-vagrant-nuclear-option.sh
Created April 6, 2016 17:28
Completely uninstall VirtualBox and Vagrant and reinstall through brew
# update brew because `brew update` is broken after updating to El Capitan
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
sudo shutdown -r now # restart the computer
# open terminal and run the following
brew update
brew cleanup
## How to hide API keys from github ##
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while
retaining your commits: https://help.github.com/articles/remove-sensitive-data/
2. In the terminal, create a config.js file and open it up:
touch config.js
atom config.js
@justincron
justincron / sets.json
Last active August 23, 2017 14:07
Bootstrap Grid for GuideGuide
{"Default":{"name":"Default","sets":{"469eb8921edf75ed3360d5838f9585c0d7a82109":{"name":"Outline","string":"| ~ | (vFl)\n| ~ | (hFl)","id":"469eb8921edf75ed3360d5838f9585c0d7a82109"},"84676cd434499994ef5176c93d970e83079cbc6c":{"name":"Two column grid","string":"| ~ | ~ | (vFl)","id":"84676cd434499994ef5176c93d970e83079cbc6c"},"d521212626e4f9f144821a52dcdaf3e1f6c8cffd":{"name":"Three column grid","string":"| ~ | ~ | ~ | (vFl)","id":"d521212626e4f9f144821a52dcdaf3e1f6c8cffd"},"836d2a54511793c6f2ecdd3447f1c727e3c83925":{"name":"1170px Grid | 1570","string":"$v = | 65px | 15px | 15px |\n$vC = | 65px |\n200px | 15px | 15px | $v*11 | $vC | 15px | 15px | 200px ( vlp, | ~ )","id":"836d2a54511793c6f2ecdd3447f1c727e3c83925"},"8d6acf586750142b4cb4bb4b6f33244211159eb9":{"name":"970px Grids | 1370","string":"$v = | 48px | 15px | 15px |\n$vC = | 48px |\n200px | 17px | 15px | $v*11 | $vC | 15px | 17px | 200px ( vlp, | ~ )","id":"8d6acf586750142b4cb4bb4b6f33244211159eb9"},"544118008c2af25e65d782c499fbe42480cf8915":{"name":"7
@paulirish
paulirish / what-forces-layout.md
Last active July 22, 2024 06:32
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@vitorbritto
vitorbritto / regex.md
Last active June 16, 2024 23:15
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 4, 2024 04:16
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@rxaviers
rxaviers / gist:7360908
Last active July 22, 2024 11:10
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: