Skip to content

Instantly share code, notes, and snippets.

View imdong's full-sized avatar

青石 imdong

View GitHub Profile
/**
* 获取该条记录的自增ID
* 将自增转换为62进制,并拼接网址 如:http://qetee.com/w7e
* 用户访问到 http://qetee.com/w7e 时,提取短网址后缀 w7e
* 将短网址后缀转换为10进制,得到自增ID号 如:123456
* 使用查询该记录,进行业务逻辑处理(比如跳转)
*/
/**
* 十进制数转换成62进制
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active May 4, 2024 15:04
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@tiann
tiann / alfred-pinyin.py
Last active April 5, 2024 14:59
make alfred support pinyin search
#! /usr/bin/python
# -*- coding: utf-8 -*-
# @author weishu @2015/12/7
import subprocess
import os
import re
import json
@corny
corny / dynv6.sh
Last active April 10, 2024 07:42
Update script for dynv6.com to set your IPv4 address and IPv6 prefix
#!/bin/sh -e
hostname=$1
device=$2
file=$HOME/.dynv6.addr6
[ -e $file ] && old=`cat $file`
if [ -z "$hostname" -o -z "$token" ]; then
echo "Usage: token=<your-authentication-token> [netmask=64] $0 your-name.dynv6.net [device]"
exit 1
fi