Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / hallofontcolor.js
Last active August 29, 2015 14:05
hallo.js font color plugin
// hallo font color plugin
// (c) 2014 Alejandro Varas
// hallofontcolor may be freely distributed under the MIT license
(function(jQuery) {
return jQuery.widget("IKS.hallofontcolor", {
options: {
uuid: '',
colors: {
"#7bd148": "Green",
@alej0varas
alej0varas / trello.py
Created September 3, 2014 00:53
My Solution to Trello challenge
""" Trello job challeng """
from itertools import product
import sys
import unittest
letters = "acdegilmnoprstuw"
def pyhash(s):
"""
@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 / 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 / 0002_migration_outdated.py
Last active September 23, 2016 10:49
ulule/django-linguist migration outdated Python35 Django110
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-23 05:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
@alej0varas
alej0varas / 0002_migration_outdated.py
Created September 23, 2016 10:49
ulule/django-linguist migration outdated Python27 Django110
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-23 05:48
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
@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"
@alej0varas
alej0varas / hallofontfamily.js
Last active November 28, 2016 08:26
hallo.js font family plugin
// hallo fontfamily plugin
// (c) 2014 Alejandro Varas
// hallofontfamily may be freely distributed under the MIT license
(function(jQuery) {
return jQuery.widget("IKS.hallofontfamily", {
options: {
uuid: '',
fonts: [
// from http://web.mit.edu/jmorzins/www/fonts.html