Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.
- Go to
settings
. - Search for
live templates
. - Under the javascript section you should be able to manage your templates.
void usleep(DWORD waitTime){ | |
LARGE_INTEGER perfCnt, start, now; | |
QueryPerformanceFrequency(&perfCnt); | |
QueryPerformanceCounter(&start); | |
do { | |
QueryPerformanceCounter((LARGE_INTEGER*) &now); | |
} while ((now.QuadPart - start.QuadPart) / float(perfCnt.QuadPart) * 1000 * 1000 < waitTime); | |
} |
"city_code" | |
"A" | |
"AA" | |
"AB" | |
"ABG" | |
"ABI" | |
"AC" | |
"AE" | |
"AH" | |
"AIB" |
addTask({ | |
variables: { input }, | |
optimisticResponse: { | |
addTask: { | |
__typename: 'Task', | |
id, | |
...input | |
} | |
}, | |
update: (proxy: any, { data: { addTask } }: any) => { |
#!/bin/bash | |
if [ ! -z $1 ]; then | |
MATCHER=$1 | |
else | |
# Try to guess the project based on directory name | |
MATCHER=`pwd | sed 's/\/.*\///'` | |
fi | |
echo "Looking for web container named '$MATCHER'..." |
openssl req -x509 -out localhost.crt -keyout localhost.key \ | |
-newkey rsa:2048 -nodes -sha256 \ | |
-subj '/CN=localhost' -extensions EXT -config <( \ | |
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") |
🚀 | |
★○• | |
¸. ¸☆ ☆ | |
° ○ ° ★ | |
☾ ★☆ ☾° | |
° ☆ ○ ° . • | |
○ ° ★☾ ☆ |
#!upstart | |
description "your fancy description that no one will see ;)" | |
author "Your Name <youremail@fqdn>" | |
# start on every run level, 2 is the one on Ubuntu | |
start on runlevel [2345] | |
# stop on halt, maintenance or reboot | |
stop on runlevel [016] |
// http://viljamis.com/blog/2013/prototyping-responsive-typography/?utm_source=Responsive+Design+Weekly&utm_campaign=76e7785581-Responsive_Design_Weekly_046&utm_medium=email | |
$browser-context: 16; // Default | |
@function em($pixels, $context: $browser-context) { | |
@return #{$pixels/$context}em | |
} |