Skip to content

Instantly share code, notes, and snippets.

View ahlfors's full-sized avatar

ahlfors

  • hangzhou
  • 11:20 (UTC +08:00)
View GitHub Profile
@ahlfors
ahlfors / sysctl.conf
Created April 24, 2023 17:19 — forked from chenshaoju/sysctl.conf
sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additonal system variables
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3
@ahlfors
ahlfors / how.md
Created March 7, 2023 10:12 — forked from Zemnmez/how.md
L2TP / ipsec VPN, Amazon Linux (EC2)
# adapted from http://spottedhyena.co.uk/centos-67-ipsecl2tp-vpn-client-unifi-usg-l2tp-server/
yum -y install epel # different on amazon linux
sudo yum -y install xl2tpd openswan
systemctl start ipsec.service
service ipsec start

# 'myserver.com' is just to help identify. these are all imported into /etc/ipsec.conf.

vim /etc/ipsec.d/myserver.com.conf # see next...
@ahlfors
ahlfors / content.md
Created November 4, 2022 09:38 — forked from baymaxium/content.md
AWS 云服务大全(71 种)

原文:Linux中国

认识 71 个 AWS 云服务的术语 ! 通过了解 AWS 世界中使用的术语开始你的 AWS 云服务使用生涯 !

-- Shrikant Lavhate

本文导航

@ahlfors
ahlfors / commands.json
Created October 31, 2022 10:16 — forked from vjeffz/commands.json
A list of all the aws-cli command examples from https://docs.aws.amazon.com/cli/latest/reference/
This file has been truncated, but you can view the full file.
{
"acm": {
"AddTagsToCertificate": [
"aws acm add-tags-to-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 --tags Key=Admin,Value=Alice Key=Purpose,Value=Website "
],
"DeleteCertificate": [
"aws acm delete-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 "
],
"DescribeCertificate": [
"aws acm describe-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 "
@ahlfors
ahlfors / README.md
Created November 30, 2018 07:10 — forked from phith0n/README.md
『代码审计』小密圈入圈指南

『代码审计』小密圈入圈指南

加入代码审计小密圈: https://wx.xiaomiquan.com/mweb/views/joingroup/join_group.html?group_id=2212251881

代码审计小密圈从去年11月成立至今已有近半年时间,一直没有把我们的宗旨和规则明文写出来,一是我比较懒事儿也比较多,二是我发现大家都是善良的小纯白,并没有谁是揣着恶意来到这里,所以这个事儿也不是特别急。但一直没有成文的规定总不是办法,有的新人进来后,四顾何茫茫,不领要旨,可能会觉得钱花的不值。

宗旨

办这个圈子,脑子里有几句话,我一直奉为圭臬,在这里说一下。

@ahlfors
ahlfors / README.md
Created November 30, 2018 07:08 — forked from phith0n/README.md
一个基于redis-py的bloom filter算法实现,哈希算法:MurmurHash。用于海量数据的去重。
import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
@ahlfors
ahlfors / remotefiles.conf
Created July 13, 2017 06:36 — forked from bennylope/remotefiles.conf
nginx remote file proxying
location ~* ^/remote-files/(http[s]*://)(.*?)/(.*) {
# Do not allow people to mess with this location directly
# Only internal redirects are allowed
internal;
# nginx has to be able to resolve the remote URLs
resolver 8.8.8.8;
# Location-specific logging
#access_log /usr/local/etc/nginx/logs/internal_redirect.access.log main;
sudo npm update npm -g
sudo npm cache clean -f
sudo npm install -g n
sudo n stable