Skip to content

Instantly share code, notes, and snippets.

View Omar-Gonzalez's full-sized avatar
💻
code & chill

Omar González Omar-Gonzalez

💻
code & chill
View GitHub Profile
function isValidInput(e, mustContain){
"use strict";
if (e.target.tagName === "INPUT"){
if (e.target.value.length === mustContain){
document.getElementById("submit").disabled = false;
}else{
document.getElementById("submit").disabled = true;
}
}
}
@Omar-Gonzalez
Omar-Gonzalez / html
Created July 9, 2017 05:05
django index bootstrap - initializer
{% load static %}
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
@Omar-Gonzalez
Omar-Gonzalez / easy_migration.py
Last active June 26, 2017 14:41
Merge all sql files in a directory into a single migration file
# -*- coding: UTF-8 -*-
import os
path = os.getcwd()
def build_query(path):
migration = '/* Eeasy Migration Tool - Write all the querys */ \n'
files = ""
for path, subdirs, files in os.walk(path):
for file in files:
@Omar-Gonzalez
Omar-Gonzalez / gist:6720244
Last active December 24, 2015 00:59
Touch and Drag a Vector Line W/Titanium & lines.mod
//Import Lines Module
var lines = require('com.lines');
//Window:
var win = Ti.UI.createWindow({
backgroundColor:'black'
});
//First event listener TouchStart the Origin Point
win.addEventListener('touchstart',function(e){