This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('a.open-window').click(function(){ | |
window.open(this.href, 'newWindow', 'menubar=0, scrollbars=1, width=780, height=900, top=10'); | |
return false; | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Estas tres etiquetas *DEBEN* ir las primeras en la cabecera; | |
cualquier otra etiqueta debe aparecer *DETRÁS* de estas tres --> | |
<meta name="description" content=""> | |
<meta name="author" content="Tony G. Bolaño"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Plantilla HTML5", | |
"author": "Tony G. Bolaño", | |
"date": "septiembre 2015", | |
"description": "Plantilla HTML5 con referencia a jQuery, html5shiv, Respond.js, ie10-viewport-bug-workaround" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
var cleanCssOptions = { | |
advanced: true | |
} | |
// configura las tareas | |
grunt.initConfig({ | |
clean: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import paramiko | |
import socket | |
import sys | |
import traceback | |
paramiko.util.log_to_file('backup.log') | |
server = 'url.example.com' | |
username = 'username' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import os | |
from PIL import Image | |
logger = logging.getLogger(__name__) | |
logging.basicConfig(filename='resize.log', level=logging.DEBUG) | |
IMG_SIZE = (800, 800) | |
IMG_MODE = 'RGBA' | |
IMG_BACKGROUND = (255, 255, 255, 255) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import httplib | |
import urllib | |
PUSHOVER_APPLICATION_TOKEN = "YOUR_TOKEN_HERE" | |
PUSHOVER_LOG_USER_TOKENS = [ | |
"USER_TOKEN_HERE", # Joe the admin | |
] | |
class PushoverHandler(logging.Handler): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyPdf import PdfFileWriter, PdfFileReader | |
import StringIO | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import letter | |
packet = StringIO.StringIO() | |
# create a new PDF with Reportlab | |
can = canvas.Canvas(packet, pagesize=letter) | |
can.drawString(100,100, "Hello world") | |
can.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"posts": [{ | |
"id": 1, | |
"title": "json-server", | |
"author": "typicode" | |
}], | |
"comments": [{ | |
"id": 1, | |
"body": "some comment", | |
"postId": 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'uses strict'; | |
// Joins path segments. Preserves initial "/" and resolves ".." and "." | |
// Does not support using ".." to go above/outside the root. | |
// This means that join("foo", "../../bar") will not resolve to "../bar" | |
const join = function(/* path segments */) { | |
// Split the inputs into a list of path commands. | |
var parts = []; | |
for (var i = 0, l = arguments.length; i < l; i++) { | |
parts = parts.concat(arguments[i].split('/')); |
OlderNewer