Skip to content

Instantly share code, notes, and snippets.

View comtom's full-sized avatar

Tomás Dowling comtom

View GitHub Profile
#!/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
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
<?php
if (isset($_POST['submit'])) {
$debug = True;
$calle = $_POST['calle'];
$interseccion = $_POST['interseccion'];
$intersecciones = array(
'Peralta Ramos',
'Del Valle',
@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)
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 / 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.
@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)

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

package pack;
public class Alumno {
private String nombre;
private String apellido;
private int edad;
public Alumno(String nombre, String apellido, int edad){
this.nombre = nombre;
this.apellido = apellido;
package turcobomber;
public class TurcoBomber {
public static void main(String[] args) {
System.out.println("Alumnos instanciados:");
// crea los objetos
pack.Alumno tomy = new pack.Alumno("Tomas", "Gonzalez Dowling", 28);
pack.Alumno flaco = new pack.Alumno("Juan", "Gonzalez Soler", 21);