Skip to content

Instantly share code, notes, and snippets.

@ilgityildirim
ilgityildirim / ngrok.md
Created January 13, 2018 19:36
Tunnel your local work to the internet using Ngrok
  • Download Ngrok first & unzip it & enter its directory
$ chmod +x ngrok
$ cp ngrok /usr/local/bin
  • Now try if everything is OK (in a directory where ngrok file doesn't exist). If you see Ngrok help, it means everything is OK.
$ ngrok -help
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@axe312ger
axe312ger / css-ninja.md
Last active July 30, 2018 10:20
I try to gather here all information to get your css knowledge to a higher level

Become a CSS ninja with reading a few links I gathered here!

There is so many information about css in the internet but most of the stuff, is totally non-sense and is just misleading people into copy & pasting bullshit where they don't understand why it is are working.

This is one of the biggest issues of frontend design! Thats why so many designs/websites fail. Especially cross-browser.

It is just a little you need to know, to truely understand how css is working. I hope these informations from other wonderful authors help you to improve yourself and make frontend and css work less painfull

@seutje
seutje / printmap.js
Created August 18, 2016 10:31
Resize map for print.
var map;
var printHandler = function(e) {
// Grab center before resize.
var center = map.getCenter();
// Tell the map it needs to resize.
window.google.maps.event.trigger(map, 'resize');
// Set the center back to what it was pre-resize.
map.setCenter(center);
};
@paulirish
paulirish / what-forces-layout.md
Last active May 9, 2024 07:00
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
@varemenos
varemenos / 1.README.md
Last active April 21, 2024 23:21
Git log in JSON format

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@fuddl
fuddl / _php_mixins.jade
Last active August 29, 2015 14:11
jade php mixins
mixin php-foreach(expr)
| <?php foreach(!{expr}): ?>
block
| <?php endforeach; ?>
mixin php-print(expr)
| <?php print !{expr}; ?>
mixin php-if(expr)
| <?php if(!{expr}): ?>