Skip to content

Instantly share code, notes, and snippets.

import sys; reload(sys); sys.setdefaultencoding('utf-8'); del sys.setdefaultencoding
from pyblake2 import blake2s
GLOBAL_LUCKY = 'j3xyAxdP4vXAecJy'
PENALTY_BASE = 1 << 252
results = []
with open('forms.txt') as f:
@jackyyf
jackyyf / wireguard.if-post-down
Created July 30, 2018 11:40
ifupdown helper for wireguard
#!/bin/bash -e
#
# wireguard helper script
#
IP=/sbin/ip
if [ "$IF_WG_CONF" -o "$IF_WG_PRIVATE_KEY" ]
then
$IP link del $IFACE
#! /bin/bash
### BEGIN INIT INFO
# Provides: ipv6
# Required-Start: $local_fs $all
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the ipv6 tunnel
# Description: ipv6 tunnel start-stop-daemon
@jackyyf
jackyyf / fuck_tcpsock.go
Created July 27, 2017 05:28
Fuck you golang.
package main
import (
"reflect"
"net"
)
func main() {
addr, err := net.ResolveTCPAddr("tcp", "119.29.29.29:80")
if err != nil {
@jackyyf
jackyyf / vote.py
Created May 11, 2017 18:48
Gist by paste.py @ 2017-05-12 02:48:45.276199
import requests
import gevent
from gevent import monkey; monkey.patch_all(); del monkey
import random
import time
concurrent = 8
delay = 0.5
def get_user_agent():
@jackyyf
jackyyf / fix-enemyfleet.go
Created April 5, 2017 23:11
Gist by paste.py @ 2017-04-06 07:11:00.703243
package main
import (
"bufio"
"fmt"
"io"
"os"
"strconv"
"strings"
"time"
@jackyyf
jackyyf / <stdin>
Created March 5, 2017 19:44
Gist by paste.py @ 2017-03-06 03:44:48.350945
Wiphy phy0
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
max # sched scan SSIDs: 0
max # match sets: 0
max # scan plans: 1
max scan plan interval: -1
max scan plan iterations: 0
Retry short limit: 7
Retry long limit: 4
@jackyyf
jackyyf / .config
Created February 23, 2017 17:08
Gist by paste.py @ 2017-02-24 01:08:14.807238
#
# Automatically generated file; DO NOT EDIT.
# User Mode Linux/x86 4.9.11 Kernel Configuration
#
CONFIG_UML=y
CONFIG_MMU=y
CONFIG_NO_IOMEM=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
@jackyyf
jackyyf / FDU_Mahjong.py
Last active January 16, 2017 14:42
第一届"伊芙"杯复旦麻将社日麻个人赛
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import random
import sys
random.seed('naive')
print 'Python Version:', sys.version
@jackyyf
jackyyf / 2016CompilerProject.md
Created October 26, 2016 12:37 — forked from taineleau-zz/2016CompilerProject.md
2016 Fudan Compiler Project

#2016 编译 Project 说明

任课老师:邱锡鹏

Project TA:陈丹露

##一、总览

  • 任务内容: