Skip to content

Instantly share code, notes, and snippets.

View steppefox's full-sized avatar
🦥

Eldar Amantay steppefox

🦥
View GitHub Profile

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

<?php
$urlUploadImages = '../uploads/img/';
$nameImage = $_POST['nameImage'];
$data = base64_decode($_POST['strBase64']);
$img = imagecreatefromstring($data);
$width = imagesx($img);
$height = imagesy($img);
$image = imagecreatetruecolor($width, $height);
imagealphablending($image, true);
$alpha_image = imagecolorallocatealpha($image, 0, 0, 0, 127);
@steppefox
steppefox / js_phantom_amazonlogin.js
Last active January 2, 2016 08:59 — forked from dariusk/amazonlogin.js
Phantomjs snippet for login in Amazon
// phantomjs code to log in to Amazon
// based on the code from this Stackoverflow answer: http://stackoverflow.com/questions/9246438/how-to-submit-a-form-using-phantomjs
// I'm injecting jQuery so this assumes you have jquery in your project directory
var page = new WebPage(), testindex = 0, loadInProgress = false;
page.onConsoleMessage = function(msg) {
console.log(msg);
};
@steppefox
steppefox / ffmpeg_compile.md
Created July 30, 2013 13:41 — forked from faleev/gist:3435377
Ffmpeg compile instruction in Ubuntu

Compile FFmpeg on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide](https://ffmpeg.org/trac/ffmpeg/wiki/Fi

Backend Architectures

ARCHITECTURES

ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats