Skip to content

Instantly share code, notes, and snippets.

View aluzed's full-sized avatar

Alex P. aluzed

  • Upg
  • PARIS
View GitHub Profile
@aluzed
aluzed / glmark2_result.txt
Created June 13, 2020 10:54
GL Mark 2 on Ryzen 7 4700U
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: X.Org
GL_RENDERER: AMD RENOIR (DRM 3.36.0, 5.4.0-37-generic, LLVM 10.0.0)
GL_VERSION: 4.6 (Compatibility Profile) Mesa 20.2.0-devel (git-4de678c 2020-06-13 focal-oibaf-ppa)
=======================================================
[build] use-vbo=false: FPS: 7141 FrameTime: 0.140 ms
[build] use-vbo=true: FPS: 8731 FrameTime: 0.115 ms
@aluzed
aluzed / get_hash.py
Created April 17, 2020 11:19
Get file checksum in Python
import hashlib, sys
if len(sys.argv) != 3:
print('Error must have 2 args : python get_hash.py <algo> <filename>')
exit(1)
algo = sys.argv[1]
filename = sys.argv[2]
func = getattr(hashlib, algo)
@aluzed
aluzed / merger.py
Last active April 17, 2020 10:51
Python file merger
import sys, hashlib, argparse
parser = argparse.ArgumentParser(description='Merge files.')
parser.add_argument('files', type=argparse.FileType('r'), nargs='+')
args = parser.parse_args()
output_file = "output"
def concat(files):
@aluzed
aluzed / npm_bin
Created June 1, 2018 10:21 — forked from arnaudcourtecuisse/npm_bin
Add this in your .bashrc to have your local node_modules/.bin in your path
PROMPT_COMMAND=__prompt_command
__prompt_command() {
# Remove previous existing .bin in $PATH
PATH=$(echo $PATH | sed -e "s@[^:]\+node_modules/.bin@@ ; s/\(^:\|:$\)// ; s/::/:/")
# Add current .bin and export
export PATH=$(npm bin):$PATH
}
const { ColumnMissing } = require('massive-collections/errors.js');
const Collection = require('massive-collections');
module.exports = (app) => {
// Get our db from app object
const db = app.get('db');
const Users = new Collection('users', db);
/**