Skip to content

Instantly share code, notes, and snippets.

@alej0varas
alej0varas / hallocolorpicker.js
Created August 20, 2014 14:23
hallo.js color picker plugin
// hallo colorpicker plugin
// (c) 2014 Alejandro Varas
// Based on https://github.com/25th-floor/hallo-simplecolorpicker-plugin
// hallocolorpicker may be freely distributed under the MIT license
(function(jQuery) {
return jQuery.widget("IKS.hallocolorpicker", {
colorElement : null,
options: {
uuid: '',
@alej0varas
alej0varas / hallofontsize.js
Created August 20, 2014 12:24
hallo.js font size plugin
// Hallo font size plugin
// Shows 7 buttons with an A + the size number.
// https://developer.mozilla.org/en-US/docs/Web/API/document.execCommand
// fontSize
// Changes the font size for the selection or at the insertion point. This requires an HTML font size (1-7) to be passed in as a // value argument.
//
// (c) 2014 Alejandro Varas
// hallofontsize may be freely distributed under the MIT license
(function(jQuery) {
@alej0varas
alej0varas / forms.py
Last active April 13, 2016 11:16
Django Tastypie Base64MultiField for file upload using "application/json" Conten-Type You need a test.png file to test
import base64
from django import forms
from django.core.files.uploadedfile import SimpleUploadedFile
class Base64MultiField(forms.MultiValueField):
def __init__(self, *args, **kwargs):
kwargs['fields'] = (
forms.CharField(),
@alej0varas
alej0varas / translations.es.lua
Created July 8, 2012 19:37
LiquidFeedback 2.0 Spanish translation
#!/usr/bin/env lua
return {
["#{count} cancelled"] = false;
["#{count} days ago"] = false;
["#{count} finished"] = false;
["#{count} in discussion"] = false;
["#{count} in verification"] = false;
["#{count} in voting"] = false;
["#{count} more areas in this unit"] = false;
["#{count} new"] = false;
@alej0varas
alej0varas / liquidfeedback-2.0-install.sh
Created July 8, 2012 19:32
LiquidFeedback 2.0 installation script
################
# Installation #
################
WWW_USER="" # use the same name as your webserver user "www-data" "lighttpd", the one who connects to the database
WWW_PATH="" # must be accesible by your webserver "/var/www/liquidfeedback
POSTGRES_USERNAME="" # use the same name as your webserver user "www-data" "lighttpd"
INSTALL_PATH="/opt"
TMP_PATH="/tmp"