Skip to content

Instantly share code, notes, and snippets.

View mastergenius's full-sized avatar

Evgeny Shcherbinin mastergenius

View GitHub Profile
@mastergenius
mastergenius / dup2
Last active August 14, 2016 21:50
Backupninja dup with swift credentials support. Place under /usr/share/backupninja/dup2
# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
# vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
#
# duplicity script for backupninja
# requires duplicity >= 0.4.4, and >= 0.4.9 when using a custom tmpdir.
#
getconf options
getconf testconnect yes
getconf nicelevel 0
@mastergenius
mastergenius / innobackupex
Created August 14, 2016 20:06 — forked from valkum/innobackupex
Use innobackupex with backupninja. Place under /usr/share/backupninja/innobackupex
# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
# vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
#
# duplicity script for backupninja
# requires duplicity >= 0.4.4, and >= 0.4.9 when using a custom tmpdir.
#
######################################
# backupdir: Where to backup to
import os
for root, dirs, files in os.walk(u"./perfum-graphics/"):
for name in files:
fixed_name = name.encode('cp1252').decode('cp1251')
print fixed_name
os.rename(os.path.join(root, name), os.path.join(root, fixed_name))
fl.outputPanel.clear();
fl.trace("Magic maker 3000 v0.7");
var SPECIAL_LAYER_NAME = "[Genearated magic layer]";
function cleanupFromGeneratedLayers(timeline) {
// Delete one generated level from timeline
for (var layerIndex in timeline.layers) {
var layer = timeline.layers[layerIndex];

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
@mastergenius
mastergenius / lxc-centos
Last active December 25, 2015 02:09 — forked from hagix9/lxc-centos
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related