This file contains hidden or 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
new Date(seconds * 1000).toISOString().substr(11, 8) |
This file contains hidden or 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
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
This file contains hidden or 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
LB: | |
image: nginx:latest | |
publish_all: true | |
mem_min: 50m | |
host: host1 | |
plugins: | |
- !plugin | |
id: 0H1Nk | |
restart: true | |
lifecycle: on_create, post_scale_out:AppServer, post_scale_in:AppServer, post_start:AppServer, post_stop:AppServer |
This file contains hidden or 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
# https://www.nginx.com/blog/tuning-nginx/ | |
worker_connections 1024; | |
# Limit the number of connections NGINX allows, for example from a single client | |
# IP address. Setting them can help prevent individual clients from opening too | |
# many connections and consuming too many resources. | |
server { | |
# When several limit_conn directives are specified, any configured limit will apply. | |
limit_conn perip 10; | |
limit_conn perserver 100; |
This file contains hidden or 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
%fix-png { | |
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)"; /* IE8 */ | |
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); /* IE6 & 7 */ | |
zoom:1; | |
&:hover { | |
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(enabled=false)"; | |
filter:"progid:DXImageTransform.Microsoft.gradient(enabled=false)"; | |
} | |
} |
This file contains hidden or 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
// SCSS | |
.rwdImage { | |
position: relative; | |
margin:0; | |
padding-bottom: 56.25%; /* 16:9 ratio */ | |
height: 0; | |
overflow: hidden; | |
img { | |
position: absolute; |
This file contains hidden or 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
// susy default settings | |
@include border-box-sizing; | |
$susy: 16 ( 45px 30px ) static; | |
$layout-desktop: 16 ( 40px 20px ) static; | |
$layout-tablet : 12 ( 40px 20px ) static; | |
$layout-mobile : 2 ( 50% 15px ) fluid inside; | |
$layout-mobileport : 2 ( 50% 15px ) fluid inside; | |
$layouts: ( | |
desktop: $layout-desktop, |
This file contains hidden or 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
/** | |
* Get a random floating point number between `min` and `max`. | |
* | |
* @param {number} min - min number | |
* @param {number} max - max number | |
* @return {number} a random floating point number | |
*/ | |
function getRandomFloat(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
This file contains hidden or 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
SELECT * FROM my_table | |
INTO OUTFILE 'my_table.csv' | |
CHARACTER SET euckr | |
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' | |
ESCAPED BY '\\' | |
LINES TERMINATED BY '\n' |