Skip to content

Instantly share code, notes, and snippets.

@kevinzhow
kevinzhow / vpnserver.sh
Last active March 19, 2019 12:59
OnClickVPNServer
#!/usr/bin/env bash
echo 'deb http://shadowsocks.org/debian wheezy main' >> /etc/apt/sources.list
# Pre-requisites
sudo apt-get -y update
sudo apt-get -y install pptpd
sudo apt-get -y install fail2ban
sudo apt-get -y install shadowsocks-libev
@genedna
genedna / email.go
Created July 2, 2014 15:44
Golang 从腾讯企业邮箱的发送邮件和一个 HTML 模板。
package main
import (
"crypto/tls"
"fmt"
"log"
"net"
"net/smtp"
)
@heroicyang
heroicyang / duoshuo_style.css
Last active May 15, 2020 09:06
Custom style for DuoShuo comment plugin in Hexo modernist theme
.ds-meta,
#ds-thread #ds-reset .ds-powered-by {
display: none;
}
#ds-thread #ds-reset .ds-sort a.ds-current,
#ds-thread #ds-reset .ds-sort a:active,
#ds-reset .ds-highlight,
#ds-thread #ds-reset .ds-login-buttons .ds-more-services {
color: #069 !important;
@tinkernels
tinkernels / ocserv.conf
Created January 28, 2015 01:43
ocserv configuration file example.
# User authentication method. Could be set multiple times and in
# that case all should succeed. To enable multiple methods use
# multiple auth directives. Available options: certificate, certificate[optional],
# plain, pam.
#auth = "certificate"
#auth = "plain[./ocserv-passwd]"
#auth = "pam"
# This indicates that a user may present a certificate. When that option
# is set, individual users or user groups can be forced to present a valid
@mathieue
mathieue / 6379.conf
Last active April 23, 2022 16:23
redis conf with disk persistance
## Generated by install_server.sh ##
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
@apechefnft
apechefnft / eth-node-comparison.js
Created May 17, 2022 21:31
Compare private Ethereum nodes
const Web3 = require('web3');
const SECONDS = 1;
const providers = [];
providers.push({name: 'ApeChef🔪 Zapnode', url: '<ENTER URL HERE>'});
providers.push({name: 'JustCubes Hypernode', url: '<ENTER URL HERE>'});
providers.push({name: 'JustCubes Supernode (Llamaverse)', url: '<ENTER URL HERE>'});
providers.push({name: 'Infura', url: '<ENTER URL HERE>'});
providers.push({name: 'Alchemy', url: '<ENTER URL HERE>'});
@pawl
pawl / cups-orangepi.md
Last active June 8, 2022 12:56
installing CUPS on orangepi zero
  1. download ubuntu image for orangepi zero LTS: http://www.orangepi.org/downloadresources/
  2. flash with etcher
  3. fiddle with USB to TTL, gave up on trying to get that to work
  4. plug ethernet into switch
  5. ssh orangepi@
  6. password orangepi
  7. couldn't successfully apt-get update upgrade, getting E: Unable to acquire the dpkg frontend lock
  8. download armbian image for orangepi zero LTS: http://www.orangepi.org/downloadresources/
  9. flash with etcher
  10. armbian-config
@wangkai2014
wangkai2014 / Service KMS
Created December 27, 2019 07:43 — forked from judero01col/Service KMS
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@mrluanma
mrluanma / requirements.txt
Created September 4, 2012 14:40
Python 登录新浪微博(requests 真的比 urllib2 强了 2^^32 倍 pip install requests)
requests==2.4.3
rsa==3.1.4
@jcppkkk
jcppkkk / OpenWithSublime.bat
Last active June 25, 2023 22:07 — forked from FoxColdMetal/OpenWithSublimeText.bat
[[[ Move to https://github.com/jcppkkk/OpenWithSublime !!! ]]] Add context menu to allow user open file or folder with Sublime as User (or as Admin).
@echo off
:: Path to Sublime Text installation dir.
SET stPath=%~dp0sublime_text.exe
SET stPathOnly=%~dp0
:: Key name for the registry entries.
SET UserEntry=Sublime Text
SET AdminEntry=Sublime Text As Admin
:: Context menu texts.
SET "UserMenuText=Open with Sublime(&-)"
SET "AdminMenuText=Open with Sublime As Admin(&+)"