Skip to content

Instantly share code, notes, and snippets.

View karminski's full-sized avatar

张旭红 (karminski-牙医) karminski

View GitHub Profile
[V=browser-hello.mp4] Hi, I'm Matthew from OpenResty Inc. In this video, I'll demonstrate how to implement a "hello world" HTTP interface using OpenResty.
First of all, we make sure we are using OpenResty's nginx.
[delay=0] $ export PATH=/usr/local/openresty/nginx/sbin:$PATH
$ which nginx
[S] It's usually in this path.
And then we go to the home directory.
@picchietti
picchietti / _wireless.md
Last active March 21, 2024 17:37
Making a wireless router with an ASUS PCE-AC88 and Linux (Ubuntu 18.04 LTS)

Introduction

This project makes a wifi router out of an ASUS PCE-AC88 wireless adapter and your Ubuntu Linux computer that can exceed top of the line routers.

Instead of buying a gaming grade router or another computer that you install openWRT on, follow this project and put the savings towards upgrading your main computer or modem.

Add Adapter

The adapter needs to be added to a PCI slot and the wireless antenna needs to be connected to the adapter. If your computer does not detect it, you may need to re-seat the adapter in the slot. If you can't detect wireless networks after installing the firmware below then this is probably why.

Install Firmware for Adapter

For your computer to use the wifi adapter you need to add the missing firmware that Asus won't provide.

@jgsqware
jgsqware / kubeadm-install-offline.md
Last active June 3, 2024 07:38
Offline Kubeadm install

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@jabenninghoff
jabenninghoff / osx-mount-drives-on-boot.md
Created September 10, 2016 16:07
Configure OS X to mount external drives at boot

By default, OS X only mounts external drives (USB, Firewire, Thunderbolt, etc.) when you log in, and unmounts them when you log out or reboot. To change this behavior, enable AutomountDisksWithoutUserLogin.

sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true

Installing OS X Server also enables this setting.

Alternatively, you can create the /Library/Preferences/SystemConfiguration/autodiskmount.plist with the following content:

@cheery
cheery / cek.py
Created May 10, 2015 12:53
CEK abstract machine
# I glanced through the pycket paper, saw few rules there. Ended up to doing this.
class Var(object):
def __init__(self, name):
self.name = name
def __repr__(self):
return self.name
class Lam(object):
@Stanback
Stanback / nginx.conf
Last active June 14, 2024 10:21 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@rtsisyk
rtsisyk / luajit-ffi-pushcdata.c
Created July 29, 2013 09:49
An example how to work with CDATA (LuaJIT FFI) objects using lua_State
void *
luaL_pushcdata(struct lua_State *L, uint32_t ctypeid, uint32_t size)
{
/*
* ctypeid is actually has CTypeID type.
* CTypeId is defined somewhere inside luajit's internal headers
* which should not be included in init.h header.
*/
static_assert(sizeof(ctypeid) == sizeof(CTypeID),
@simon-wenmouth
simon-wenmouth / ubuntu-12-lsi-9260-setup.txt
Created August 29, 2012 18:01
LSI 9260-8i Ubuntu Kernel Module Installation
install basic build packages
sudo apt-get install build-essential
sudo apt-get install linux-source
download driver from LSI site(Linux 5.3)
http://www.lsi.com/support/Pages/Download-Results.aspx?productcode=P00066&assettype=Driver&component=Storage%20Component&productfamily=RAID%20Controllers&productname=MegaRAID%20SAS%209260-8i
@zrong
zrong / dnspodsh.sh
Last active April 2, 2024 04:44
在bash中使用DNSPod的API接口实现DDNS客户端
#!/bin/bash
##############################
# dnspodsh v0.3
# 基于dnspod api构架的bash ddns客户端
# 作者:zrong(zengrong.net)
# 详细介绍:http://zengrong.net/post/1524.htm
# 创建日期:2012-02-13
# 更新日期:2012-03-11
##############################