Skip to content

Instantly share code, notes, and snippets.

View comtom's full-sized avatar

Tomás Dowling comtom

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

@comtom
comtom / Example Django AJAX view
Last active August 29, 2015 13:57
Example Django AJAX view
def getSomething(request):
""" get something model in a format that fullcalendar can read """
userId = request.user
somethingList = Something.objects.filter(something__user__id=userId)
results = []
for something in somethingList:
something_dict = {'id':something.id, 'title':something.title, 'start':str(something.startdate), 'end':str(something.enddate), 'allDay':True, 'editable':True }
results.append(something_dict)
@comtom
comtom / easygui_modified.py
Last active January 3, 2016 06:08
Modified easygui, to support custom caption text on buttons :)
"""
@version: 0.96(2010-08-29)
@note:
ABOUT EASYGUI
EasyGui provides an easy-to-use interface for simple GUI interaction
with a user. It does not require the programmer to know anything about
tkinter, frames, widgets, callbacks or lambda. All GUI interactions are
invoked by simple function calls that return results.
How to crack Sublime Text (2 and 3)
===
1. Open Sublime in a HEX editor (the executable file)
2. Find 43 33 33 42 30 32
3. Replace in the string above 33 42 with 32 42
4. Save
5. Enter the license below:
—–BEGIN LICENSE—–
@comtom
comtom / update_chromium.sh
Last active September 27, 2015 06:48
Actualizar chromium al ultimo daily build
#!/bin/sh
# Autor: Tomás González Dowling
# Colaboradores: Fernando Ramirez y Facundo Guerrero
# Empresa: Comtom Tech Support
# Licencia: GPL 3
# Creamos un direcorio temporal
unzipdir=$(mktemp -d)
<?php
if (isset($_POST['submit'])) {
$debug = True;
$calle = $_POST['calle'];
$interseccion = $_POST['interseccion'];
$intersecciones = array(
'Peralta Ramos',
'Del Valle',
en /etc/rc.local
mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "1" > /dev/cgroup/cpu/user/notify_on_release
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
en ~/.bashrc
#!/bin/sh
# firewire device (dv cam or twinpact)
# ====================================
# dvsource-dvgrab - collects parameters from command line and config files, connects stdout to dvswitch, shells out to dvgrab which sends dv stream to stdout, thus dvswitch.
#
# The use running dvsource-dvgrab will need read/write permission on the /dev/raw1394 node. This can be done by putting both in the video group:
#
# # /etc/udev/rules.d/91-permissions.rules
# # ieee1394 devices