Skip to content

Instantly share code, notes, and snippets.

View Szeliga's full-sized avatar

Szymon Szeliga Szeliga

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

# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@Szeliga
Szeliga / gist:3d4ce2925c89a7fbcc59
Created February 25, 2015 12:24
Webpack config
var webpack = require('webpack');
var path = require('path');
var node_modules_dir = __dirname + '/node_modules';
var node_env = process.env.NODE_ENV;
var config = {
addVendor: function(name, path) {
this.resolve.alias[name] = path;
},
addPlugin: function(plugin) {
class DatePickerInput < SimpleForm::Inputs::StringInput
def display_pattern
I18n.t('datepicker.dformat', default: '%d/%m/%Y')
end
def picker_pattern
I18n.t('datepicker.pformat', default: 'dd/MM/yyyy')
end
def wrapper_classes
app.directive 'slickCarousel', ->
restrict: "A"
link: (scope, element, attrs, ctrl) ->
scope.responsive =
breakpoint: 1024
settings:
slidesToShow: 3
slidesToScroll: 3
infinite: true
dots: true
%h1 HAML
#main_wrapper
.left_column
- if @clients.any?
= render @clients
- else
No clients available
.right_column= render :partial => “menu”
@mixin table-base
th
text-align: center
font-weight: bold
td, th
padding: 2px
@mixin left($dist)
float: left
margin-left: $dist
<h1>PLAIN HTML</h1>
<div id="main_wrapper">
<div class="left_column">
<% if @clients.any? %>
<%= render @clients %>
<% else %>
No clients available
<% end %>
</div>
<div class="right_column">
MyApp::Application.routes.draw do
root :to => "frontend#index"
namespace :api do
resources :users
resources :clients
end
match 'photos/:id' => 'photos#show'
end
@Szeliga
Szeliga / gist:3532886
Created August 30, 2012 16:47
Client list bb index
class MasterCrm.Views.Organization.Index extends Backbone.View
initialize: ->
@collection = new MasterCrm.Collections.Users()
@collection.on("reset change", @render_collection, this)
@collection.on "add", @append_element, this
$.fancybox.showActivity()
@collection.fetch()
@render()