Skip to content

Instantly share code, notes, and snippets.

@infinityhacks
infinityhacks / nginx-handrolled-lua-spdy-pagespeed
Created October 16, 2018 14:58 — forked from shrikeh/nginx-handrolled-lua-spdy-pagespeed
Set up nginx with Lua, Pagespeed, et al.
# Ubuntu instructions
# Get the pre-reqs for this (Ubuntu)
sudo apt-get install git-core build-essential zlib1g-dev libpcre3 libpcre3-dev redis-server libssl-dev libgeoip-dev libgoogle-perftools-dev geoip-database lua5.1 liblua5.1-0 liblua5.1-0-dev lua-iconv-dev libghc-iconv-dev luarocks libpcre3-dev libghc-zlib-bindings-dev
# For Centos:
sudo yum install wget
wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" http://inserturl.here
@infinityhacks
infinityhacks / rdate.md
Created March 4, 2021 04:56 — forked from vqiu/rdate.md
使用 rdate 替代ntp 功能

总有那么些蛋疼的机房,为了所谓的这安全,将NTP 服务器一刀切了。这时候时间同步就是一个问题,不过我们还可以使用 rdate 来解决。

yum -y install rdate
rdate -s time.nist.gov

cat > /etc/cron.daily/rdate << "EOF"
#!/bin/sh
rdate -s time.nist.gov
@infinityhacks
infinityhacks / python_athena.py
Created June 1, 2021 07:20 — forked from ankit-crossml/python_athena.py
Medium Blog - Athena S3 - python athena example
import boto3
import time
import re
client = boto3.client('athena')
# run athen query
response = client.start_query_execution(
QueryString=athena_query,
QueryExecutionContext={'Database': ATHENA_DATABASE_NAME},
#!/bin/bash
set -o errexit
clear
# Set versions. Check http://openresty.org for latest version and bundled version of nginx.
OPENRESTY_VERSION=1.9.3.1
NGINX_VERSION=1.9.3
OPENSSL_VERSION=1.0.2d
NPS_VERSION=1.9.32.10
@infinityhacks
infinityhacks / eslintrc
Created November 23, 2022 16:26 — forked from gndx/eslintrc
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["airbnb"],
"globals": {
"document": false,
"escape": false,