Skip to content

Instantly share code, notes, and snippets.

View zerodi's full-sized avatar

Dmitriy Pyankov zerodi

View GitHub Profile
@zerodi
zerodi / compress.js
Last active April 15, 2021 02:39 — forked from aldo-roman/compress.js
Brotli compression with Angular CLI
const brotli = require('brotli');
const zlib = require('zlib');
const fs = require('fs');
const brotliSettings = {
extension: 'br',
skipLarger: true,
mode: 1, // 0 = generic, 1 = text, 2 = font (WOFF2)
quality: 10, // 0 - 11,
lgwin: 12 // default
@zerodi
zerodi / django-secret-keygen.py
Last active November 5, 2015 11:53 — forked from mattseymour/django-secret-keygen.py
Django secret key generator
from __future__ import print_function
"""
Pseudo-random django secret key generator.
- Does print SECRET key to terminal which can be seen as unsafe.
"""
import string
import random