Skip to content

Instantly share code, notes, and snippets.

View zerodi's full-sized avatar

Dmitriy Pyankov zerodi

View GitHub Profile
@zerodi
zerodi / eff_word_gen.py
Created August 7, 2020 16:04
Passphrase generator based on EFF wordlist. Also can read string of numbers and show you words from wordlist
#!/usr/bin/env python3
#####
#
# Passphrase generator based on EFF wordlist
# Can generate new array of words and string of numbers for it
# Also can read string of numbers and show you words from wordlist
#
#####
@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

Keybase proof

I hereby claim:

  • I am zerodi on github.
  • I am zerodi (https://keybase.io/zerodi) on keybase.
  • I have a public key ASBh7GPkF_EG1j0CuQfkaYN7rVeLuSCPPq01dhP6eZmpEAo

To claim this, I am signing this object:

@zerodi
zerodi / adobe-hack.sh
Created November 23, 2016 09:41
2 small bash scripts to backup and restore amtlib.framework
adobe-backup() {
find /Applications/Adobe\ */**/amtlib.framework -type d -maxdepth 0 | while read FOLDER ;
do
newname="$(echo ${FOLDER} | awk -F '/' '{print $3}')";
cp -r ${FOLDER} ~/adobe.backup/${newname};
done
}
adobe-restore() {
for FOLDER in ~/adobe.backup/*
@zerodi
zerodi / Gulpfile.js
Last active December 22, 2015 10:28
Gulp task to compile handlebars templates in amd
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
gulp.task('templates', function () {
gulp.src('templates/**/*.hbs')
.pipe($.handlebars({
handlebars: require('handlebars')
}))
.pipe($.wrap('template(<%= contents %>)'))
.pipe($.declare({
@zerodi
zerodi / Vagrantfile
Created October 22, 2015 20:48
Simple vagrant template with hostmanager plugin
# -*- mode: ruby -*-
# vi: set ft=ruby :
PROJECT_NAME="touchmy"
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "#{PROJECT_NAME}.dev"
config.vm.network "private_network", type: "dhcp"
@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