some tools for diagrams in software documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//author: http://github.com/wongoo | |
//date: 20190717 | |
package rsautil | |
import ( | |
"bytes" | |
"crypto" | |
"crypto/rand" | |
"crypto/rsa" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ciphers | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/sha512" | |
"crypto/x509" | |
"encoding/pem" | |
"log" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################ | |
# | |
# Script name: MultiMedia Concat Script (mmcat) | |
# Author: burek ([email protected]) | |
# License: GNU/GPL, see http://www.gnu.org/copyleft/gpl.html | |
# Date: 2012-07-14 | |
# | |
# This script concatenates (joins, merges) several audio/video inputs into one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// expires方法的参数是以秒为单位的,其他的方法跟localStorage的相同 | |
// 方法有:getItem/setItem/removeItem/clear/expires | |
// 30秒后过期 | |
storage.setItem("test","hello world").expires(30); | |
storage.setItem("test","hello world"); | |
storage.expires(30); | |
// clear全部由storage创建的localStorage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//load VDF data either from API call or fetching from file/url | |
//no matter your method, $json must contain the VDF data to be parsed | |
$json = file_get_contents("items_game.txt"); | |
//encapsulate in braces | |
$json = "{\n$json\n}"; | |
//replace open braces | |
$pattern = '/"([^"]*)"(\s*){/'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import simplejson | |
import logging | |
import random | |
import re | |
import datetime | |
import string | |
import time | |
import sys | |
import urllib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Javascript EXIF Reader 0.1.4 | |
* Copyright (c) 2008 Jacob Seidelin, [email protected], http://blog.nihilogic.dk/ | |
* Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt] | |
*/ | |
var EXIF = {}; | |
(function() { |
NewerOlder