Skip to content

Instantly share code, notes, and snippets.

View smartree's full-sized avatar

JasonSmartree smartree

View GitHub Profile
@AlanDecode
AlanDecode / getDownloadInfo.php
Last active May 19, 2020 19:29
从 GitHub API 获取仓库附件下载量。受 API 限制,下载量统计不包括 Source ​code。
<?php
/**
* GitHub Release 下载监控
*
* @author AlanDecode | 熊猫小A
* @link https://www.imalan.cn
* @version 1.0
*/
$UserName = 'AlanDecode';
@smartree
smartree / StrongSWAN L2TP IPsec RSA Hybrid 全类型配置
Created June 29, 2018 11:50
All VPN Type for Android client ipsec.conf
目前Android手机常见VPN连接支持类型:
PPTP
L2TP/IPsec PSK
L2TP/IPsec RSA #比较特别
IPsec Xauth PSK
IPsec Xauth RSA
IPsec Hybrid RSA
cat > /usr/local/etc/ipsec.conf<<-EOF
config setup
@smartree
smartree / L2TP IPsec RSA
Last active June 29, 2018 11:57 — forked from konosukef/chap-secrets
L2TP/IPsec RSA
安卓手机目前常见支持的VPN连接模式:
PPTP
L2TP/IPsec PSK
L2TP/IPsec RSA 本gist涉及的目标配置
IPsec Xauth PSK
IPsec Xauth RSA
https://www.strongswan.org/testing/testresults/ikev1/index.html
https://www.strongswan.org/testing/testresults/all.html
https://www.strongswan.org/testing/testresults/
@bingoohuang
bingoohuang / ps.sh
Created June 27, 2018 15:39
ps output lstart in ISO format like YYYY-MM-DD HH:MM:SS
# from: https://unix.stackexchange.com/questions/401785/ps-output-with-iso-date-format
ps -eo lstart,pid,cmd --sort=start_time|sed '1d' | awk '{c="date -d\""$1 FS $2 FS $3 FS $4 FS $5"\" +\047%Y-%m-%dT%H:%M:%S\047"; c|getline d; close(c); $1=$2=$3=$4=$5=""; printf "%s\n",d$0 }'
#2018-04-23T15:38:18 1 /sbin/init
#2018-04-23T15:38:18 2 [kthreadd]
#2018-04-23T15:38:18 3 [migration/0]
#2018-04-23T15:38:18 4 [ksoftirqd/0]
#2018-04-23T15:38:18 5 [stopper/0]
#2018-04-23T15:38:18 6 [watchdog/0]
@miekg
miekg / coredns.yaml
Created January 13, 2018 10:31
CoreDNS kubernetes deployment yaml
apiVersion: v1
kind: Service
metadata:
name: coredns
spec:
ports:
- name: coredns
port: 53
protocol: UDP
targetPort: 53
@matijs
matijs / README.md
Last active July 3, 2025 21:22
Solarized Dark profile for macOS Terminal.app

Solarized Dark profile for Terminal.app on macOS High Sierra

Based on the excellent Solarized (Dark) created by Ethan Schoonover. For source code, check the main Solarized repository on GitHub.

Installation

Open and save Solarized Dark.terminal.

Import from the “Profiles” tab in the settings of Terminal.app or just double-click the file after downloading.

@miekg
miekg / udpserv.c
Created May 10, 2017 10:33
udp server in C
/*
* udpserver.c - A simple UDP echo server
* usage: udpserver <port>
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
@miekg
miekg / udpserv.go
Created May 10, 2017 09:29
Simple udp server in Go
package main
import (
"log"
"net"
)
func main() {
// listen to incoming udp packets
pc, err := net.ListenPacket("udp", ":1053")
@melpon
melpon / wandbox-sponsors.md
Last active March 2, 2022 05:31
Wandboxのスポンサー募集(締め切りました)

スポンサーの募集は締め切りました。以後は GitHub Sponsors に移行する予定です。

どのような募集をしていたか知りたい場合は履歴を確認してください。

@BretFisher
BretFisher / docker-for-mac.md
Last active June 23, 2025 11:39
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1