Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Kurt Shian fotock

🎯
Focusing
View GitHub Profile
View basic.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Amir Salihefendic
" http://amix.dk - amix@amix.dk
"
" Version:
" 6.0 - 01/04/17 14:24:34
"
" Blog_post:
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
@fotock
fotock / nginx.conf
Last active Nov 15, 2020 — forked from plentz/nginx.conf
Nginx SSL 安全配置最佳实践.
View nginx.conf
# 生成 dhparam.pem 文件, 在命令行执行任一方法:
# 方法1: 很慢
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# 方法2: 较快
# 与方法1无明显区别. 2048位也足够用, 4096更强
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096
@fotock
fotock / index.html
Last active Dec 29, 2016
Aspect Ratio CSS
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.ratio-1-1,.ratio-2-1,.ratio-3-2,.ratio-4-3,.ratio-3-4,.ratio-16-9 {position:relative;overflow:hidden;}
.ratio-1-1:before,.ratio-2-1:before,.ratio-3-2:before,.ratio-4-3:before,.ratio-3-4:before,.ratio-16-9:before {display:block;content:"";width:100%;}
.ratio-1-1>.content,.ratio-2-1>.content,.ratio-3-2>.content,.ratio-4-3>.content,.ratio-3-4>.content,.ratio-16-9>.content {position: absolute;top:0;left:0;right:0;bottom:0;}
.ratio-1-1:before {padding-top:100%;}
.ratio-2-1:before {padding-top:50%;}
.ratio-3-2:before {padding-top:66.67%;}
.ratio-4-3:before {padding-top:75%;}
@fotock
fotock / index.html
Last active Aug 29, 2015
Swift Bubbles in D3.js
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
text {font-size: 13px;font-family: Helvetica,Arial,sans-serif; font-weight:100; fill: rgba(255,255,255, .6); transition: .2s; cursor: pointer;}
g:hover text {font-size: 18px; fill: rgba(255,255,255,1)}
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var diameter = 960, format = d3.format(",d"), color = d3.scale.category10();
@fotock
fotock / index.html
Last active Aug 29, 2015
Chart.js Bar Chart
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.bar-legend {list-style: none; overflow: auto; margin-left: 17px;}
.bar-legend li {float: left; margin-right: 20px;}
.bar-legend span {display: block; width: 20px; height: 20px; float: left; margin-right: 6px;}
</style>
<body>
<div id="legend"></div>
<canvas id="jsChart" width="800" height="400" style="margin:10px 30px;"></canvas>
@fotock
fotock / index.html
Last active Aug 29, 2015
Chart.js Practice
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<canvas id="jsChart" width="800" height="400" style="margin:10px 30px;"></canvas>
<script src="https://cdn.rawgit.com/nnnick/Chart.js/master/Chart.js"></script>
<script>
var data = {
labels: ["03-24", "03-25", "03-26", "03-27", "03-28", "03-29", "03-30"],
datasets: [
@fotock
fotock / index.html
Last active Aug 29, 2015
A C3.js Line Chart
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<link href="http://c3js.org/css/c3-b03125fa.css" rel="stylesheet" type="text/css" />
<body>
<div id="chart" style="margin-top: 30px;"></div>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://c3js.org/js/c3.min-12912fb6.js"></script>
<script>
View NginxPerformance.md

#Introduction

##Nginx Nginx is a fast and lightweight alternative to the sometimes overbearing Apache 2. However, Nginx just like any kind of server or software must be tuned to help attain optimal performance.

ulimit -l
You can’t perform that action at this time.