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
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
//Thank to @Formstone https://github.com/Formstone/Selecter/blob/master/src/jquery.fs.selecter.js | |
if (window.document.createEvent) { // All | |
var evt = window.document.createEvent("MouseEvents"); | |
evt.initMouseEvent("mousedown", false, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
el.dispatchEvent(evt); | |
} else if (el.fireEvent) { // IE | |
el.fireEvent("onmousedown"); | |
} |
# replace james2doyle with your own github username | |
function git-create() { | |
if [ $# -eq 2 ]; then | |
# name of repo to be created | |
PROJECTNAME="$1" | |
DESCRIPTION="$2" | |
POST="{\"name\":\"$PROJECTNAME\",\"description\":\"$DESCRIPTION\"}" | |
curl –sS -u 'james2doyle' https://api.github.com/user/repos -d "$POST" | |
git remote add origin git@github.com:james2doyle/$PROJECTNAME.git | |
echo "remote origin added" |
{ | |
"name": "project-name", | |
"description": "Template for static sites", | |
"version": "1.0.0", | |
"homepage": "http://www.project-name.com", | |
"author": { | |
"name": "Adam Reis", | |
"url": "http://adam.reis.nz" | |
}, | |
"license": "UNLICENSED", |
console.log(1); | |
(_ => console.log(2))(); | |
eval('console.log(3);'); | |
console.log.call(null, 4); | |
console.log.apply(null, [5]); | |
new Function('console.log(6)')(); | |
Reflect.apply(console.log, null, [7]) | |
Reflect.construct(function(){console.log(8)}, []); | |
Function.prototype.apply.call(console.log, null, [9]); | |
Function.prototype.call.call(console.log, null, 10); |
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)So there were a few threads going around recently about a challenge to write the longest sequence of keywords in Javascript:
There are, however, a few problems: