Skip to content

Instantly share code, notes, and snippets.

View antonsukhonosenko's full-sized avatar

Anton Sukhonosenko antonsukhonosenko

View GitHub Profile
# -*- coding: utf-8 -*-
"""
Go to Google Bookmarks: https://www.google.com/bookmarks/
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en
After downloading the html file, run this script on it to generate a KML.
"""

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

@antonsukhonosenko
antonsukhonosenko / RootViewController part
Created October 16, 2011 10:44
Laker framework - trying to add image to intermediate scrollView
- (void)initPageNumbersForPages:(int)count {
pageSpinners = [[NSMutableArray alloc] initWithCapacity:count];
for (int i = 0; i < count; i++) {
// ****** Spinners
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
spinner.backgroundColor = [UIColor clearColor];
CGRect frame = spinner.frame;
frame.origin.x = pageWidth * i + (pageWidth + frame.size.width) / 2 - 20;