Skip to content

Instantly share code, notes, and snippets.

View puppywang's full-sized avatar
🏠
Working from home

puppywang

🏠
Working from home
View GitHub Profile
@puppywang
puppywang / remove_gitlab.sh
Created August 20, 2018 03:04
Complete remove gitlab new version and install old version
#! /bin/sh
#This worked for me in Ubuntu 16 and let me install an older version of gitlab: https://askubuntu.com/questions/824696/is-it-fine-to-remove-the-opt-gitlab-directory-manually-after-removing-the-gitl 213
#Remove services
sudo gitlab-ctl uninstall
#Clean any data generated by usage of the package
sudo gitlab-ctl cleanse
from Crypto.Cipher import AES
from Crypto.Util import Counter
import struct
"""
typedef struct boot_dat_hdr
{
unsigned char ident[0x10];
unsigned char sha2_s2[0x20];
unsigned int s2_dst;
@puppywang
puppywang / 键盘编辑器使用说明.md
Last active June 4, 2018 08:44
键盘编辑器使用说明


Windows用户

  1. 安装Python 2,下载地址:Python 2.7.15,可自选安装32位或者64位版本
  2. 安装的时候,务必在安装选项中选择,Add python to PATH environment
  3. Win+R打开运行对话框,输入cmd启动命令行工具,输入python,确定系统的python可用再进入下一步
# Setup egcon and pvid for K2P & K2
switch vlan set 2 0000110 0 0 ----tt-
switch vlan set 1 1111101 0 0 uuuuu-u
switch pvid 4 1
# Setup portmap for K2P
switch reg w 0x2004 0x005f0003
switch reg w 0x2104 0x005f0003
switch reg w 0x2204 0x005f0003
switch reg w 0x2304 0x005f0003
@puppywang
puppywang / cloudflare-update-record.sh
Created May 7, 2018 01:44
A cloudflare update script for padavan router, need full function grep
#!/bin/bash
# CHANGE THESE
auth_email="xxxxxx@gmail.com"
auth_key="xxxxxxxxxxxxxxxxxx" # found in cloudflare account settings
zone_name="xxxxxx"
record_name="xxxxxxxx"
# MAYBE CHANGE THESE
ip=$(curl -s http://ip.3322.org/)