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
// IMPORT ONCE | |
// Prevent styles from being loaded multiple times for components that rely on other components. | |
$modules: () !default; | |
@mixin exports($name) { | |
$module_index: index($modules, $name); | |
@if not index($modules, $name) { | |
$modules: append($modules, $name) !global; | |
@content; | |
} | |
} |
function toBeProfiled(){ | |
console.log(new Error('Show me the stack!')); | |
//Do something here | |
} | |
function launchApp(){ | |
function doThing(){ | |
console.debug(toBeProfiled); | |
toBeProfiled(); |
/** | |
* How to automatically vote on VoicePolls -__- #ScriptKiddieLevel | |
* | |
* Guys, you should really check — at least — for IPs and — at least — put a rate-limit on API calls. | |
* | |
* Usage : | |
* $ npm install async request | |
* $ node vote.js | |
*/ |
// First configure $animateProvider | |
angular.module('MyApp', ['ngAnimate']).config(['$animateProvider', function($animateProvider){ | |
// restrict animation to elements with the bi-animate css class with a regexp. | |
// note: "bi-*" is our css namespace at @Bringr. | |
$animateProvider.classNameFilter(/bi-animate/); | |
}]); |
<div class="svg-icon svg-icon--cloud"></div> |
#!/bin/bash | |
SCRIPTPATH=`git rev-parse --show-toplevel`"/.git/hooks" | |
HOOKS="${SCRIPTPATH}/pre-commit-*" | |
shopt -s nullglob | |
pass=true | |
for hook in $HOOKS |
#!/bin/sh | |
# | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod a+x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} |
$base-font-size: 16px; | |
$base-line-height: 1.5; | |
// this value may vary for each font | |
// unitless value relative to 1em | |
$cap-height: 0.68; | |
@mixin baseline($font-size, $scale: 2) { |
git config --global mergetool.sublime.cmd "subl -w \$MERGED" | |
git config --global mergetool.sublime.trustExitCode false | |
git config --global merge.tool sublime | |
git mergetool -y |