Skip to content

Instantly share code, notes, and snippets.

View zaa's full-sized avatar

Aleksandr Zhuravlev zaa

View GitHub Profile
@zaa
zaa / build.json
Created April 15, 2018 12:51 — forked from PHLAK/build.json
Packer QEMU / KVM example.
{
"variables": {
"ssh_user": "root",
"ssh_pass": "T@c0_Bu3n0"
},
"builders": [
{
@zaa
zaa / gist:58114231778b4546efa6
Created October 31, 2015 11:40 — forked from analytically/gist:1a6bdcfa711474d7ba24
Ubuntu 14.04 AWS EC2 cloud-init (Kernel 3.18+NTP+ixgbevf+Docker+Route53) - to be used with ami-870a2fb7 and newer instance types (eg. t2, m3, c3, r3)
#!/bin/bash
set -e
sudo rm -f /etc/update-motd.d/10-help-text
sudo rm -f /etc/update-motd.d/51-cloudguest
sudo rm -f /etc/update-motd.d/91-release-upgrade
echo -e "[sysinfo]\nexclude_sysinfo_plugins = LandscapeLink" | sudo tee /etc/landscape/client.conf
echo deb https://get.docker.com/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
@zaa
zaa / markdown.css
Last active August 29, 2015 14:21 — forked from imjasonh/markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@zaa
zaa / graphite.md
Last active August 29, 2015 14:10 — forked from ashrithr/graphite.md

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know

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

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

@zaa
zaa / gist:2430311
Created April 20, 2012 17:04 — forked from marcel/gist:2100703
giftube – Generates an animated gif from a YouTube url.
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#
@zaa
zaa / patch-keep-slave-data.diff
Created December 22, 2011 09:45 — forked from ambroff/patch-keep-slave-data.diff
Allow setting up replication without purging data in the slave first.
diff --git a/redis.conf b/redis.conf
index 44fb536..505cb6e 100644
--- a/redis.conf
+++ b/redis.conf
@@ -150,6 +150,13 @@ slave-serve-stale-data yes
#
# repl-timeout 60
+# When setting up replication, the slave will purge the current data set before
+# loading the data sync from the master. Setting this will prevent that from
@zaa
zaa / README.MD
Created December 7, 2011 03:59 — forked from wynst/README.MD
A Thor Task to unwatch *all* Github watched repositories (excluding owned) and optionally export to delicious.

A Thor Task to unwatch all Github watched repositories (excluding owned) and optionally export to delicious.

Sorry Github, for I have sinned. I use the Watch feature as a bookmarker.

Install required gems:

gem install thor rest-client

Use it as such:

@zaa
zaa / license
Created January 27, 2010 10:33 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license
#
# $ license > COPYING
year=`date "+%Y"`
cat <<EOF
Copyright (c) $year Alexander Zhuravlev
Permission is hereby granted, free of charge, to any person obtaining