Skip to content

Instantly share code, notes, and snippets.

<head>
...
<link rel="stylesheet" href="../shared/css/base.css" />
<script src="https://unpkg.com/react@15/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>
</head>
<style>
table { font-family: sans-serif; border-collapse: collapse; width: 600px; }
thead { background-color: rgb(135,250,195); }
td { text-align: center; padding: 8px; border: 4px solid #000; }
</style>
<table>
<colgroup>
<col width="122">
<col width="226">
<col width="253">
/\ /\
/ \ /\ / \
/ \ /\ / \ / \
/\/\/\/\ / \ /\/\/\ /\/\/\/\
////\\\\\\ /\/\/\ ////\\\\ /////\\\\\
/////\\\\\\\ ////\\\\ /////\\\\\ //////\\\\\\
//////\\\\\\\\/////\\\\\//////\\\\\\///////\\\\\\\
///////\\\\\\\\\////\\\\///////\\\\\\\//////\\\\\\\\
////////\\ AMARGA MARGA ////////\\\\\\\\/////\\\\\\\\\
@hvergara
hvergara / getscript.js
Created September 27, 2012 04:16
getScript() - load scripts asynchronously w/375 bytes of code - e.g. `getScript(src, cb)`
// # getScript()
// more or less stolen from jquery core and adapted by paul irish
function getScript(url,success) {
var head = document.getElementsByTagName("head")[0], done = false;
var script = document.createElement("script");
script.src = url;
// Attach handlers for all browsers
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") ) {
{
"10101": {
"nombre": "Puerto Montt",
"distrito": 57,
"circunscripcion": 17,
"prov_id": 101
},
"10102": {
"nombre": "Calbuco",
"distrito": 57,
<?php
/*
+----------------------------------------------------------------------+
| APC |
+----------------------------------------------------------------------+
| Copyright (c) 2006-2011 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
@hvergara
hvergara / gist:1690368
Created January 27, 2012 19:04
generic init.d script
#! /bin/sh
###
# chkconfig: 235 98 55
# description: Your service
###
NAME="your service name"
DAEMON=/usr/bin/service
PIDFILE=/var/run/service.pid
@hvergara
hvergara / gist:1404796
Created November 29, 2011 13:23 — forked from KristianLyng/gist:1404599
VCL state diagram
.-----------------.
.----------| receive request |
v '-----------------'
.--------------.
| vcl_recv | Varnish 3.0 state diagram
.-----------|--------------|-------------. Not entierly complete.
| | req | | Misses error/restart and
v '--------------' v some internals
pass lookup pipe
| | |
var download = new SpeedTest.Download('samples/8mb.bin?' + Math.random());
download.on('progress', function(loaded, total, rate) {
var percent = Math.round(loaded / total * 100),
kbps = Math.round(rate / 1024);
console.log(percent + ' loaded at ' + kbps + ' kbps')
}
var latency = new SpeedTest.Latency('samples/empty.bin?' + Math.random());
latency.on('finish', function(size, time) {
console.log('Latency: ' + time + ' ms');
}