Skip to content

Instantly share code, notes, and snippets.

View azproduction's full-sized avatar

Mikhail Davydov azproduction

View GitHub Profile
@staltz
staltz / introrx.md
Last active April 19, 2024 18:49
The introduction to Reactive Programming you've been missing
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active February 25, 2024 13:47
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

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

@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@TooTallNate
TooTallNate / mouse.js
Created January 30, 2012 05:55
Enable "mouse reporting" with Node.js
// Based on:
// http://groups.google.com/group/nodejs-dev/browse_thread/thread/a0c23008029e5fa7
process.stdin.resume();
process.stdin.on('data', function (b) {
var s = b.toString('utf8');
if (s === '\u0003') {
console.error('Ctrl+C');
process.stdin.pause();
@YaroslavLyzlov
YaroslavLyzlov / gist:4190256
Created December 2, 2012 18:15
dixonich@gmail.com [NODEJS] -- Собственно, мне как-то надо получить данные с клиента (я получаю дефолтным аяксом, методом GET) но, не могу их получить на сервере. Я вроде бы и понимаю, что получение данных с сервера должно быть в одной области видимости с
/* суть в том, что если
var url_string = request.url;
var params = url.parse(url_string, true).query;
console.log(params["name"]);
в одной области видимости с response.end() (то есть, в collection.find(), то всё работает, но я не знаю, как мне совместить добавление в БД и извлечение из неё, чтобы всё было хорошо и никто никому не мешал)
*/
var http = require("http");
var url = require("url");
var Db = require ("mongodb").Db;
@azproduction
azproduction / LICENSE.txt
Created December 19, 2011 16:31 — forked from 140bytes/LICENSE.txt
Simple argv parser in 100 bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mikhail Davydov
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE