Skip to content

Instantly share code, notes, and snippets.

@nevergiveup-j
nevergiveup-j / onerror
Last active June 12, 2018 06:09
前端代码异常日志收集与监控
/**
* @param {String} msg 错误信息
* @param {String} url 出错的文件
* @param {Long} line 出错代码的行号
* @param {Long} col 出错代码的列号
* @param {Object} error 错误的详细信息,Anything
*/
window.onerror = function(msg,url,line,col,error){
//没有URL不上报!上报也不知道错误
if (msg != "Script error." && !url){
@WincerChan
WincerChan / export.py
Last active January 7, 2025 22:23
导出qq聊天记录的小脚本(需要{qq号}.db和IMEI码)
from hashlib import md5
from sqlite3 import connect as sql_conn
from time import localtime, strftime
class IllegalException(Exception):
def __init__(self, *args):
super().__init__(*args)
@miguelmota
miguelmota / rsa_util.go
Last active April 11, 2025 12:33
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)
@wongoo
wongoo / rsautil.go
Created August 1, 2019 03:19
golang RSA utility, include encrypt/decrypt/signature
//author: http://github.com/wongoo
//date: 20190717
package rsautil
import (
"bytes"
"crypto"
"crypto/rand"
"crypto/rsa"