Skip to content

Instantly share code, notes, and snippets.

@clivetyphon
clivetyphon / easy-client-vpn-strongswan.md
Last active March 23, 2023 09:09
Easy client VPN for all major platforms using strongSwan IPsec

Easy client VPN for all major platforms using strongSwan IPsec

Overview

The goal here is to provide quick and easy but secure client VPN that can be configured natively without any additional software on:

  • Linux
  • iOS
  • Android
  • Windows
  • OSX

Install arch on a Lenovo Yoga 11e Chromebook

The Thinkpad Yoga 11e isn't the most popular chromebook, but you can readily pick one up for less than 200$, and it's physically built like a tank. You could throw it at a man, pick it back up, and go on typing.

This chromebook is a member of the categories "braswell" and "ULTIMA".

I'll describe the process I followed to get Arch running on it. The firmware steps should be the same if you'd like to install Gallium, an excellent chromebook-optimized distro forked from Xubuntu.

Firmware

@billryan
billryan / README.md
Last active August 30, 2022 13:41 — forked from chuangbo/README.md
DNSPod DDNS Python Script

替换上你的ID, Token, domain, sub_domain 就可以运行了。(ID,Token) 可以从 API 鉴权方式升级为 Token 获得。 脚本会在后台一直运行,初始化时会根据 sub_domain 查询是否已经创建,每隔30秒检查一遍IP,如果修改了就更新IP。

以 Archlinux 为例,按照如下步骤操作即可设置开机启动这个 DDNS 服务。

sudo wget -O /usr/local/bin/dnspod_ddns.py https://gist.github.com/billryan/239778f0821937939c8c140bdddd6840/raw/dnspod_ddns.py
sudo chmod +x /usr/local/bin/dnspod_ddns.py
sudo wget -O /etc/systemd/system/dnspod-ddns.py.service https://gist.github.com/billryan/239778f0821937939c8c140bdddd6840/raw/dnspod-ddns.service
sudo systemctl start dnspod-ddns
<!DOCTYPE html> <!-- HTML5 doctype 不区分大小写 -->
<html lang="zh-cmn-Hans-CN"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用IE最新版本和 Chrome -->
<meta name="renderer" content="webkit|ie-comp|ie-stand"> <!-- 360 浏览器内核控制 -->
<!--
content的取值为webkit,ie-comp,ie-stand之一,区分大小写,分别代表用webkit内核,IE兼容内核,IE标准内核。
@oxUnd
oxUnd / install-php.md
Last active October 6, 2022 12:24
Mac下安装php-cgi

Mac下安装php-cgi

mac下安装php-cgi有多种方法,这里只介绍比较简单的两个方法;

  • 用brew安装
  • 直接下载安装XAMPP

用brew安装

如果安装了xcode,那么推荐使用brew来安装php。详细使用方法见官网,这里只说明如何装php-cgi;

@hwdsl2
hwdsl2 / .MOVED.md
Last active March 16, 2024 16:50
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
@plentz
plentz / nginx.conf
Last active March 20, 2024 18:49
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jhjguxin
jhjguxin / nginx-403-forbidden-error-hosting-in-user-home-directory.md
Created August 12, 2013 05:40
nginx 403 forbidden error when server static file under user home directory
@miglen
miglen / Apache Tomcat 8 Start stop script init.d script
Last active November 10, 2022 20:03 — forked from valotas/tomcat.sh
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under
@guilleferrer
guilleferrer / Date Range Mongo Query
Created January 24, 2012 11:50
Query for a date range using Mongo Timestamps
db.Collection.find({
created_at : {
'$gte': new Timestamp(new Date(2012, 0, 21), 0),
'$lte': new Timestamp(new Date(2012, 0, 22), 0)
})