View gist:faa0e3b2d763feee1348af45ab2473ad
<!-- ====================================
Colors for git annotation
====================================== -->
<dict>
<key>name</key>
<string>Git Modified Line</string>
<key>scope</key>
<string>git.changes.x</string>
<key>settings</key>
<dict>
View force_unicode.py
def force_unicode(string, codecs=['utf8', 'cp1252']):
""" Force use unicode when you don't know correct codec of the string """
for i in codecs:
try:
return unicode(string, i)
except:
pass
View rut-flask-restful-validation
# encoding=utf-8
# Idea of a Custom data types for validate the Chilean RUT in Flask-RESTful
# by @lacosox
from itertools import cycle
#rut='XXXXXXXX-X'
def chilean_rut(rut_text):
rut_text.upper().strip().replace(".", "").replace("K", "10")
(rut, dv)=rut_text.split('-')
View laravelUseless.flt
## This is a directory/file filter for WinMerge
## This filter is a helper for compare 2 laravel proyects in Windows
name: Exclude Laravel useless
desc: Exclude additional data from Laravel Proyects
## This is an inclusive (loose) filter
## (it lets through everything not specified)
def: include
## Filters for filenames begin with f:
View gist:4056369
View coloresbash.sh
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
View gist:4056328
<!DOCTYPE html>
<html lang="en">
<head>
<title>Prueba Canvas</title>
<script type="text/javascript">
function dibujar()
{
var canvas=document.getElementById('miCanvas');
var ctx=canvas.getContext('2d');
ctx.fillRect(100,100,200,50);
View gist:4056325
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SVG</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<rect x="100" y="100" width="200" height="100" style="stroke:#FF0000; fill:#FF0000;"/>
<polygon points="100,100 150,50 200,100 250,50 300,100" style="stroke:#FF0000; fill:#FF0000;" />
View websql_basico
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web SQL</title>
<script type="text/javascript">
function almacenar()
{
var db=openDatabase('Mibbdd','1.0','mi base de datos', 2*1024*1024);
db.transaction(function(tx)
View gist:4056320
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web Storage</title>
<script type="text/javascript">
function almacenar()
{
if (typeof(Storage)!=='undefined')
{