A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| #!/bin/bash | |
| # Author: xezrunner (github.com/xezrunner) | |
| # Inspired by Jonathan Blow's nocheckin setup with SVN (twitch.tv/j_blow) (youtube.com/@jblow888) | |
| # Credits to DustinGadal on r/Jai: reddit.com/r/Jai/comments/jp0vjy/nocheckin_behavior_in_gitsourcetree/gbfhzd1 | |
| # gist.github.com/xezrunner/e6dbafcc21fcbc976c93bdee0f371a08 | |
| # This pre-commit hook checks for the keyword "$NOCHECKIN_KEYWORD" in staged files,then aborts the commit | |
| # if any matches were found, with output of file path, line number and match preview. |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
| @echo off | |
| echo Loading VC... | |
| call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" amd64 | |
| echo Loading bash, you may now use git and msbuild in the same console \o/. | |
| "C:\Program Files\Git\usr\bin\bash.exe" --login -i |
| 574 : string [std] | |
| 311 : source | |
| 278 : entity [std] | |
| 253 : keyword [std] | |
| 242 : comment [std] | |
| 236 : entity.name.tag | |
| 229 : constant [std] | |
| 212 : support.function [std] | |
| 209 : storage [std] | |
| 209 : entity.other.attribute-name |
| #!/bin/bash | |
| # This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch. | |
| # There are six variants that I have built: | |
| # - pre-commit: stops commits to master/main/develop branches. | |
| # - pre-commit-2: also includes a core.whitespace check. | |
| # - pre-commit-3: the core.whitespace check and an EOF-newline-check. | |
| # - pre-commit-4: only the core.whitespace check. | |
| # - pre-commit-5: elixir formatting check. | |
| # - pre-commit-6: prettier formatting check. | |
| # Set the desired version like this before proceeding: |
| #/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # forked by Gianluca Guarini | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep -E --quiet "$1" && eval "$2" | |
| } |
| #!/bin/sh | |
| # this hook is in SCM so that it can be shared | |
| # to install it, create a symbolic link in the projects .git/hooks folder | |
| # | |
| # i.e. - from the .git/hooks directory, run | |
| # $ ln -s ../../git-hooks/pre-commit.sh pre-commit | |
| # | |
| # to skip the tests, run with the --no-verify argument | |
| # i.e. - $ 'git commit --no-verify' |
In Tools | Options | Keyboard...
CTRL+W as a Global shortcut for Window.CloseDocumentWindowCTRL+W shortcut for Edit.SelectCurrentWordThe caveat to this is if you are used to using CTRL+W to select the current word. If you do, find another shortcut that works for that.
| function countCSSRules() { | |
| var results = '', | |
| log = ''; | |
| if (!document.styleSheets) { | |
| return; | |
| } | |
| for (var i = 0; i < document.styleSheets.length; i++) { | |
| countSheet(document.styleSheets[i]); | |
| } | |
| function countSheet(sheet) { |