Skip to content

Instantly share code, notes, and snippets.

[code language=playonlinux]
#!/bin/bash
# This Script helps to instal >>Altium Designer 10, 2013, 2014<<
# Written by Robert Paulo
[ "$PLAYONLINUX" = "" ] && exit
source "$PLAYONLINUX/lib/sources"
@kaajavi
kaajavi / gitignore para Django
Created October 2, 2015 13:22
Un gitignore personalizado para django
#Para django:
*.db
migrations/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
@kaajavi
kaajavi / LOGS_ON_TWISTED.PY
Created September 23, 2015 01:11
Rotated file log twisted
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
An example of using the rotating log.
"""
from twisted.python import log
$(window).on("scroll", function() {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
// when scroll to bottom of the page
}
});
@kaajavi
kaajavi / gist:5f7d4bcd28df001d02b2
Last active August 29, 2015 14:19
Mostrar particiones del disco duro
sudo fixparts /dev/sda
@kaajavi
kaajavi / Nunca frenar grub
Last active August 29, 2015 14:04
Permite no frenar el grub
//UNICA LINEA QUE DICE '"${recordfail}" = 1'
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
por esto otro
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=10
Esta son aplicaciones de django muy utiles, para como dice la filosofia de Instagram no reinventar la rueda :).
django-mingus
django-ratings
django-ajax-validation
django-google-analytics
// PostgreSQL
@GrabConfig(systemClassLoader=true)
@Grab('postgresql:postgresql:9.0-801.jdbc4')
def sql = groovy.sql.Sql.newInstance(
"jdbc:postgresql://host.example.org/database",
"username", "password", "org.postgresql.Driver")
// MySQL
@GrabConfig(systemClassLoader=true)