Skip to content

Instantly share code, notes, and snippets.

! Version: 201904030727
! Title: EasyList
! Last modified: 03 Apr 2019 07:27 UTC
! Expires: 4 days (update frequency)
! Homepage: https://easylist.to/
! Licence: https://easylist.to/pages/licence.html
!
! Please report any unblocked adverts or problems
! in the forums (https://forums.lanik.us/)
! or via e-mail ([email protected]).
@usshen
usshen / keybase.md
Created September 14, 2019 11:26
keybase

Keybase proof

I hereby claim:

  • I am usshen on github.
  • I am weshen (https://keybase.io/weshen) on keybase.
  • I have a public key ASDbCMw3c1LbqS1y4jLBMIsFTw6pOTiRKGqMFh0Kfv0zAgo

To claim this, I am signing this object:

@usshen
usshen / l10n_IETF_Language_tags.md
Created August 9, 2020 02:51 — forked from traysr/l10n_IETF_Language_tags.md
Commonly used IETF language tags
@usshen
usshen / nginx
Created September 4, 2020 12:34
nginx boot at startup. path: /etc/init.d/nginx
#! /bin/sh
# chkconfig: 2345 55 2
# Description: Startup script for nginx webserver on Debian. Place in /etc/init.d and
# run 'update-rc.d -f nginx defaults', or use the appropriate command on your
# distro. For CentOS/Redhat run: 'chkconfig --add nginx'
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
@usshen
usshen / aria2AddUri.py
Last active October 3, 2020 05:52
python 3.0 add uri to aria2c to download
import xmlrpc.client
import sys
aria2URL = sys.argv[1]
aria2RPC = xmlrpc.client.ServerProxy("http://localhost:6800/rpc")
aria2Result = aria2RPC.aria2.addUri("token:rpcscrete",[aria2URL])
@usshen
usshen / aria2AddUri.py
Created October 3, 2020 05:54
python 2.0
import xmlrpclib
import sys
aria2URL = sys.argv[1]
aria2RPC = xmlrpclib.ServerProxy("http://localhost:6800/rpc")
aria2Result = aria2RPC.aria2.addUri("token:rpcscrete",[aria2URL])
[Unit]
Description=trojan
Documentation=man:trojan(1) https://trojan-gfw.github.io/trojan/config https://trojan-gfw.github.io/trojan/
After=network.target network-online.target nss-lookup.target mysql.service mariadb.service mysqld.service
[Service]
Type=simple
StandardError=journal
User=root
AmbientCapabilities=CAP_NET_BIND_SERVICE
@usshen
usshen / invokeWithCookie.ps1
Created February 10, 2021 15:03 — forked from lawrencegripper/invokeWithCookie.ps1
Invoke-webrequest With Cookie
$downloadToPath = "c:\somewhere\on\disk\file.zip"
$remoteFileLocation = "http://somewhere/on/the/internet"
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$cookie = New-Object System.Net.Cookie
$cookie.Name = "cookieName"
$cookie.Value = "valueOfCookie"
@usshen
usshen / WireGuard-site-to-site.md
Created March 25, 2021 10:43
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary