Skip to content

Instantly share code, notes, and snippets.

View dapao9999's full-sized avatar

dcdc8888 dapao9999

View GitHub Profile
import os
import sys
gpu = os.popen('nvidia-smi').read()
if 'K80' in gpu or 'P4' in gpu:
sys.exit()
os.system('rm ggzero_linux lc0')
os.system('wget https://github.com/leedavid/leela-chess-to-Chinese-Chess/raw/master/lc0/ggzero_linux')
os.system('wget https://github.com/leedavid/leela-chess-to-Chinese-Chess/raw/master/lc0/lc0')
os.system('chmod +x ggzero_linux lc0')
os.system('./ggzero_linux --user 书包 --password 123456')
wget -c https://github.com/leedavid/leela-chess-to-Chinese-Chess/raw/master/lc0/ggzero_linux
wget -c https://github.com/leedavid/leela-chess-to-Chinese-Chess/raw/master/lc0/lc0
chmod +x lc0
chmod +x ggzero_linux
./ggzero_linux --user 'dad' --password '123456'
@dapao9999
dapao9999 / BaiduPCS-appid-getter.py
Created September 9, 2019 12:56 — forked from pcmid/BaiduPCS-appid-getter.py
获取有效的百度app_id
from __future__ import print_function
import requests
import threading
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
@dapao9999
dapao9999 / ikev2.xml
Created April 12, 2019 13:09
IKEv2 VPN profile for Apple devices, Pre-Shared Key(PSK)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- IKEv2 IPSec VPN profile for Apple devices, Pre-Shared Key(PSK), no username password.
References:
https://wiki.strongswan.org/projects/strongswan/wiki/AppleIKEv2Profile
https://developer.apple.com/library/mac/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html
https://help.apple.com/configurator
The extension of this file should be .mobileconfig -->
@dapao9999
dapao9999 / IKEv2.mobileconfig
Created April 12, 2019 04:21 — forked from zqqf16/IKEv2.mobileconfig
strongSwan IKEv2 configurations for iOS without certificate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IKEv2</key>
<dict>
<key>AuthName</key>
d-i debian-installer/locale string en_US
d-i console-setup/layoutcode string us
d-i keyboard-configuration/xkb-keymap string us
d-i netcfg/choose_interface select $IFETH
d-i netcfg/disable_autoconfig boolean true
d-i netcfg/dhcp_failed note
d-i netcfg/dhcp_options select Configure network manually
d-i netcfg/get_ipaddress string $IPv4
d-i netcfg/get_netmask string $MASK
d-i netcfg/get_gateway string $GATE
d-i debian-installer/language string en
d-i debian-installer/country string HK
d-i debian-installer/locale string en_US.UTF-8
# Keyboard selection.
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration console-setup/detected note
d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/model select Generic 105-key (Intl) PC
d-i keyboard-configuration/xkb-keymap select us
@dapao9999
dapao9999 / ipsec.conf
Created August 22, 2018 19:30 — forked from dunkelstern/ipsec.conf
StrongSWAN ipsec config for IKEv2 VPN
# ipsec.conf - strongSwan IPsec configuration file
config setup
charondebug="ike 4, knl 4, cfg 4, net 4, esp 4, dmn 4, mgr 4"
conn %default
keyexchange=ike
ike=aes128-sha1-modp1024,aes128-sha1-modp1536,aes128-sha1-modp2048,aes128-sha256-ecp256,aes128-sha256-modp1024,aes128-sha256-modp1536,aes128-sha256-modp2048,aes256-aes128-sha256-sha1-modp2048-modp4096-modp1024,aes256-sha1-modp1024,aes256-sha256-modp1024,aes256-sha256-modp1536,aes256-sha256-modp2048,aes256-sha256-modp4096,aes256-sha384-ecp384,aes256-sha384-modp1024,aes256-sha384-modp1536,aes256-sha384-modp2048,aes256-sha384-modp4096,aes256gcm16-aes256gcm12-aes128gcm16-aes128gcm12-sha256-sha1-modp2048-modp4096-modp1024,3des-sha1-modp1024!
esp=aes128-aes256-sha1-sha256-modp2048-modp4096-modp1024,aes128-sha1,aes128-sha1-modp1024,aes128-sha1-modp1536,aes128-sha1-modp2048,aes128-sha256,aes128-sha256-ecp256,aes128-sha256-modp1024,aes128-sha256-modp1536,aes128-sha256-modp2048,aes128gcm12-aes128gcm16-aes256gcm12-aes256gcm16-modp2048-modp4096-modp
@dapao9999
dapao9999 / make-chr.sh
Created August 20, 2018 13:08 — forked from stroebs/make-chr.sh
Install Mikrotik CHR on a Digital Ocean droplet
wget http://download2.mikrotik.com/routeros/6.40.5/chr-6.40.5.img.zip -O chr.img.zip && \
gunzip -c chr.img.zip > chr.img && \
apt-get update && \
apt install -y qemu-utils pv && \
qemu-img convert chr.img -O qcow2 chr.qcow2 && \
qemu-img resize chr.qcow2 `fdisk /dev/vda -l | head -n 1 | cut -d',' -f 2 | cut -d' ' -f 2` && \
modprobe nbd && \
qemu-nbd -c /dev/nbd0 chr.qcow2 && \
echo "Give some time for qemu-nbd to be ready" && \
sleep 2 && \
1330-1147-9851-4130-3716-7375
1330-1813-5332-3018-4123-4267
1330-1051-6550-8129-0825-6051
1330-1422-5419-8706-7784-9778
1330-1190-8727-8855-7379-9047
1330-1167-8857-3801-9962-4540
1330-1789-8301-0298-0184-8899
1330-1269-7959-3810-9366-9145
1330-1971-4830-5668-6067-1762
1330-1912-2628-0850-0232-4869