Skip to content

Instantly share code, notes, and snippets.

@comwrg
comwrg / URL
Created May 1, 2021 07:46
ShiroApacheKey统计
https://raw.githubusercontent.com/01jiwenhua/guns/c732955091eca977d79abd9c11860d850f4e60b7/guns-admin/src/main/java/com/stylefeng/guns/config/web/ShiroConfig.java
https://raw.githubusercontent.com/03040081/Dubbo/9201b8857a73bf40c0feff9e1d517986db647972/guns/guns-admin/src/main/java/com/stylefeng/guns/config/web/ShiroConfig.java
https://raw.githubusercontent.com/0415wangyibo/learningDemo/40ef0a580677322bca1bec0d6c0547d0dac1bb1b/AuthenticationDemo/ehcache/AuthenticationDemo/src/main/java/com/wangyb/learningdemo/authentication/config/ShiroConfig.java
https://raw.githubusercontent.com/0415wangyibo/learningDemo/40ef0a580677322bca1bec0d6c0547d0dac1bb1b/AuthenticationDemo/redis/AuthenticationDemo/src/main/java/com/wangyb/learningdemo/authentication/config/ShiroConfig.java
https://raw.githubusercontent.com/0415wangyibo/learningDemo/40ef0a580677322bca1bec0d6c0547d0dac1bb1b/SpringbootLearn-master/shiro-jwt/src/main/java/com/potoyang/learn/shirojwt/shiro/ShiroConfig.java
https://raw.githubusercontent.com/0415wangyibo/sp
@comwrg
comwrg / mongo-ls.js
Last active November 18, 2019 11:02 — forked from matteofigus/mongo-ls.js
A script to list all the collections and document count for a specific mongodb db
// Usage: mongo {Server without mongodb:// example 127.0.0.1:27017}/{DbName} [-u {Username}] [-p {Password}] < ./mongo-ls.js
var collections = db.getCollectionNames();
print('Collections inside the db:');
var sum = 0;
for(var i = 0; i < collections.length; i++){
var name = collections[i];
if(name.substr(0, 6) != 'system') {
import javaobj
import gzip
import base64
import io
b='H4sIAAAAAAAAAGVSzU7jMBAempZCQeJnpb2shDjtMeWnDVQcFm0lRKUAK5C4gpNMkxQnNrYL6YUn4iUQT8B134F3YNy05c+HsWfm8+f5Zvz4CjWt4FcoMjdgGt2hSbl2MxEhd8/RnOgYyjVXgXoPqiFlfKjf4MhPtTGw6g/YHWvaa00bOfChymm/hQeY88HJdGxgvQRxlsfNC6PSPCaYI4LB59RZMMDQMsxT6oRJAysf2ClgUwr1kNPDPz5c7OUGY1QHhbSVSilJ0m8rKcd7AkRuFgjpSqaYe4kq7achM6nIu6TlXV2FyA3TN73I1k7e0p3Fjq6s5HGoULDxjXXctb9k/hH9O9sSCWRSTqgaKFWYjLpTJookIsNuakaz5xwe6MlxQUhUpyybgqtCplNYTah45jgab6dxgzwXE2dxqFGdqXhG3ii1zAooqLlQltco7RcjCbDZ3gs93O2HQd8LWhiw/Z3WPvO8Truz3e5seS0DVZ23d6nba3YY48/jHjOd0Kxq9f9Pzz+vXxyoHEGDCxYdsdAI1YNFk9AQE8GjQv45HDds+X6B7Ko9FvINFgkGr5QCAAA='
s = base64.b64decode(b)
s = io.BytesIO(s)
f = gzip.GzipFile(fileobj=s)
o = javaobj.loads(f.read())
@comwrg
comwrg / usb.md
Created December 4, 2017 13:06
usb
@comwrg
comwrg / geforce_download.md
Created December 3, 2017 10:15
geforce drivers download URL
@comwrg
comwrg / tensorflow_env.md
Last active December 2, 2017 13:59
log install tensorflow env
@comwrg
comwrg / cpp_problems.md
Last active November 29, 2017 01:18
cpp problems

cpp problems

To log problem during reading << C++ Primer >>

1

#include <iostream>

int main() {
    int ival(int());
    std::cout << ival << std::endl;
 return 0;
@comwrg
comwrg / python2x_ascii_error.md
Created November 22, 2017 08:21
python2.x, 关于windows目录下带中文报ASCII错误解决办法

error

UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-5: ordinal not in range(128)

solution

reference: https://www.v2ex.com/t/90659 python目录 Python27\Lib\site-packages 建一个文件sitecustomize.py 内容写: import sys sys.setdefaultencoding('gb2312') python会自动运行这个文件。

@comwrg
comwrg / multi_decorators.md
Last active November 19, 2017 06:10
python multi decorators
def makebold(fn):
    def wrapped():
        return "<b>" + fn() + "</b>"
    return wrapped

def makeitalic(fn):
    def wrapped():
        return "<i>" + fn() + "</i>"
 return wrapped
@comwrg
comwrg / github-ssh.md
Last active November 18, 2017 15:29
waste some time...so bad

testing ssh command is

Hi username! You've successfully authenticated, but GitHub does not provide shell access.

successful text