Skip to content

Instantly share code, notes, and snippets.

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

Z. Jiang Zenuncl

🏠
Working from home
View GitHub Profile
@Zenuncl
Zenuncl / proof.md
Created April 10, 2024 05:04
GunPG Proof Github

$argon2id$v=19$m=64,t=512,p=2$V63KdLZ350aeW/RkrL9rjA$vE/Aq2rlxSyuZBSSCAf+nA

@Zenuncl
Zenuncl / keybase.md
Created June 23, 2020 22:16
Keybase Prove

Keybase proof

I hereby claim:

  • I am sharking on github.
  • I am sharking (https://keybase.io/sharking) on keybase.
  • I have a public key ASCgOxMQLCOt8FonsxaFodhui_n_ICrnvI_x9xIfO9XDQQo

To claim this, I am signing this object:

{"sig":"ab27294e1b324b1388388f39cebdd252f71a7b7de5d94fe299a4914f1f9b57b52140f2fcc5eeba6e21c8790502a56cd138621686edefa4f7decd9bacf38f99c81","msghash":"dca22a797cd47ddeae2ab5e4050bae2e6938a1f67a9f9ae95599a4efabae5946"}
@Zenuncl
Zenuncl / gencert.sh
Created September 28, 2015 01:40
Gen Self Sign Cert
#!/bin/sh
# create self-signed server certificate:
read -p "Enter your domain [www.example.com]: " DOMAIN
echo "Create server key..."
openssl genrsa -des3 -out $DOMAIN.key 1024
@Zenuncl
Zenuncl / pptp_install.sh
Created November 19, 2014 17:51
PPTP VPN 安装脚本
#!/bin/bash
type pptpd > /dev/null 2>&1
[ $? -ne 0 ] && apt-get install pptpd
grep '^localip 192.168.' /etc/pptpd.conf > /dev/null
if [ $? -ne 0 ]; then
cat >> /etc/pptpd.conf <<PPTPDCONF
localip 192.168.17.1
remoteip 192.168.17.11-60
@Zenuncl
Zenuncl / gist:2b86024180b2a5e93e6a
Created November 16, 2014 05:38
MapReduce - Mapper
import java.io.IOException;
import java.util.*;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapreduce.*;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reporter;
public class Mappers extends Mapper<LongWritable, Text, Text, IntWritable> {
@Zenuncl
Zenuncl / Logcat
Created March 6, 2014 05:10
Android LogCat
03-06 00:07:53.227: D/dalvikvm(904): GC_FOR_ALLOC freed 230K, 13% free 2748K/3140K, paused 34ms, total 37ms
03-06 00:07:53.227: I/dalvikvm-heap(904): Grow heap (frag case) to 3.445MB for 635812-byte allocation
03-06 00:07:53.347: D/dalvikvm(904): GC_FOR_ALLOC freed 4K, 11% free 3364K/3764K, paused 116ms, total 116ms
03-06 00:07:53.387: D/dalvikvm(904): GC_FOR_ALLOC freed <1K, 11% free 3364K/3764K, paused 32ms, total 33ms
03-06 00:07:53.387: I/dalvikvm-heap(904): Grow heap (frag case) to 3.917MB for 500416-byte allocation
03-06 00:07:53.509: D/dalvikvm(904): GC_FOR_ALLOC freed <1K, 10% free 3852K/4256K, paused 109ms, total 109ms
03-06 00:07:53.606: E/SQLiteLog(904): (1) near "tabletasksdatabase": syntax error
03-06 00:07:53.616: D/AndroidRuntime(904): Shutting down VM
03-06 00:07:53.616: W/dalvikvm(904): threadid=1: thread exiting with uncaught exception (group=0x41465700)
03-06 00:07:53.638: E/AndroidRuntime(904): FATAL EXCEPTION: main
@Zenuncl
Zenuncl / firewall.sh
Created December 10, 2013 23:00 — forked from x1a0/firewall.sh
#! /bin/bash
# Set the default policies to allow everything while we set up new rules.
# Prevents cutting yourself off when running from remote SSH.
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush any existing rules, leaving just the defaults
iptables -F
import WordLookup
def changeling(initial,goal,steps):
first=initial
last=goal
### The Word Check Function Part ###
if WordLookup.lookup(initial) == False or WordLookup.lookup(goal) == False:
return "Not in the List"
@Zenuncl
Zenuncl / Changeling2
Last active December 27, 2015 23:48
changeling
from WordLookup import lookup
# This is a helper function which converts a word string into a list with each letter as an element
def wordToList(word):
i=0
a=[]
while i < len(word):
a.append(word[i])
i+=1
return a