Ctrl+KB | toggle side bar |
Ctrl+Shift+P | command prompt |
Ctrl+` | python console |
Ctrl+N | new file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { getUpAttributes } from "./utils" | |
function transition(element, stages) { | |
stages.start() | |
stages.during() | |
requestAnimationFrame(() => { | |
// Note: Safari's transitionDuration property will list out comma separated transition durations | |
// for every single transition property. Let's grab the first one and call it a day. | |
let duration = Number(getComputedStyle(element).transitionDuration.replace(/,.*/, '').replace('s', '')) * 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
REPLY_SPLITTER_REG = re.compile(r"^From:\s*[a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}|^From:\s.*\[mailto:[a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\]|^On\s.*\s<[\s|][a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}>[\s|]wrote:$|^On\s.+?wrote:$|^Le\s.*\s<[\s|][a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}>[\s|]a\sécrit\s:$|^Le\s.+?a\sécrit\s:$|^.*<[a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}>.*$|^-+[\s|]Message\stransféré[\s|]-+$|^-+[\s|]Original\s+Message[\s|]-+$|^-+[\s|]Reply Message[\s|]-+$|^Sent.*from.*my.*|^envoyé\s+depuis\s+mon.*| ^envoyé\s+de\s+mon.*|^" + 'reply above this line' + "|^↑ Merci de répondre par dessus cette ligne ↑$|^-- $|^>\s|^[-|_]{3,}$|^\*{5,}DISCLAIMER\*{5,}$|^—$", re.I | re.M) | |
#try it here : http://regex101.com/r/oE7sC7/3 |
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A (very) WIP collection of optimized/recommended jQuery plugin patterns | |
from @addyosmani, @cowboy, @ajpiano and others. | |
Disclaimer: | |
----------------------- | |
Whilst the end-goal of this gist is to provide a list of recommended patterns, this | |
is still very much a work-in-progress. I am not advocating the use of anything here | |
until we've had sufficient time to tweak and weed out what the most useful patterns |