Skip to content

Instantly share code, notes, and snippets.

View ricardosiri68's full-sized avatar

Ricardo Agustin Siri ricardosiri68

  • Nubi
  • Capital Federal
View GitHub Profile
(function () {
var dateTimeController = function ($scope, $rootScope) {
$scope.vm = {
message: "Bootstrap DateTimePicker Directive",
dateTime: {}
};
$scope.$watch('change', function(){
console.log($scope.vm.dateTime);
});
@ricardosiri68
ricardosiri68 / pre-commit.sh
Last active November 17, 2015 23:42 — forked from milancermak/pre-commit.sh
Python pre-commit hook
#!/bin/sh
# make sure requirements.txt is up to date with every commit
# by comparing the output of pip freeze
source [virtualenv_path]/bin/activate
pip freeze | diff requirements.txt - > /dev/null
if [ $? != 0 ]
then
echo "Missing python module dependencies in requirements.txt. Run 'pip freeze > requirements.txt' to update."
deactivate
<!DOCTYPE html>
<html>
<head>
<title>Demo 1 - Menucool Image Slider</title>
<link href="themes/1/js-image-slider.css" rel="stylesheet" type="text/css" />
<script src="themes/1/js-image-slider.js" type="text/javascript"></script>
<link href="generic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="div1"><h2>Demo 1 - Menucool Image Slider</h2>
#!/usr/bin/env python3
# Peter Simonyi 1 June 2012
'''A binary clock: prints the current time (HHMMSS) in binary-coded decimal.
Each BCD digit takes one column; least-significant bits are at the bottom.
Example: at 21:14:59 (local time):
000001
000110
100000
011011
@ricardosiri68
ricardosiri68 / main.py
Last active December 28, 2015 11:39 — forked from anonymous/gist:7494553
import MySQLdb
import datetime
basededatos = MySQLdb.connect(host='localhost',passwd='1234',user='root', db = 'trabajo_practico' )
cursor = basededatos.cursor()
nombre = raw_input ("Ingrese nombre: ")
responsable = raw_input ("Ingrese nombre del responsable: ")
fecha_inicio= input ("Ingrese fecha (fomarto y-m-d):")
estado= raw_input("Ingrese el estado: ")
from django.db import models
class Autor(models.Model):
id = models.AutoField(primary_key=True)
nombre = models.CharFIeld(max_length=100)
class Libro(models.Model):
id = models.AutoField(primary_key=True)
nombre = models.CharField(max_length=100)
autor = models.ForeignKey(Autor)
<?php
$id="1";
$fecha = "29/12/2002";
$cliente = "Carlitos Bala";
$para = "Ernesto Sabato";
$concepto = " ... con cariño de carlitos .. una aspiradora";
$responsable = "Carlos Flavio Jacinto Bala";
$link = "http://www.poringa.net";
// Lee la plantilla
$plantilla = file_get_contents('plantilla.rtf');
<link rel="shortcut icon" href="Imagenes/abolskyicon.ico" >
<meta charset=utf-8" />
<title>a&a Intranet</title>
<link href="Imagenes/twoColLiqLtHdr.css" rel="stylesheet" type="text/css" />
<section class="contenedorlat inicio">
<aside class="columna latbanner">
<div>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','117','height','60','vspace','5','src','images/indoorkart','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/indoorkart' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="117" height="60" vspace="5">
<param name="movie" value="images/indoorkart.swf">
<param name="quality" value="high">
<embed src="images/indoorkart.swf" width="117" height="60" vspace="5" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>
</object></noscript>
<?php
session_start();
include('acceso_db.php');
if(isset($_POST['enviar'])) { // comprobamos que se hayan enviado los datos del formulario
// comprobamos que los campos usuarios_nombre y usuario_clave no estén vacíos
if(empty($_POST['usuario_nombre']) || empty($_POST['usuario_clave'])) {
echo "El usuario o la contraseña no han sido ingresados. <a href='javascript:history.back();'>Reintentar</a>";
}else {
// "limpiamos" los campos del formulario de posibles códigos maliciosos
$usuario_nombre = mysql_real_escape_string($_POST['usuario_nombre']);