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) | |
# Credit: DustinGadal on r/Jai | |
# https://www.reddit.com/r/Jai/comments/jp0vjy/nocheckin_behavior_in_gitsourcetree/gbfhzd1/ | |
# Required programs/utilities for default behavior (as-is): | |
# git, grep, xargs | |
# This pre-commit hook/script checks for the existence of the word "$SEARCH_TARGET" | |
# in your *staged* source files, then aborts the commit if any matches were found. |
#!/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.CloseDocumentWindow
CTRL+W
shortcut for Edit.SelectCurrentWord
The 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) { |