Skip to content

Instantly share code, notes, and snippets.

View JJ's full-sized avatar
🏠
Working from home

Juan Julián Merelo Guervós JJ

🏠
Working from home
View GitHub Profile
@robertklep
robertklep / gist:5127432
Created March 10, 2013 06:50
Hello World for gunicorn and Node.js
# both tested with: httperf --hog --server 127.0.0.1 --port 8012 --num-conn 100 --num-calls 100
# gunicorn -k gevent -b 0.0.0.0:8012 app:application
def application(environ, start_response):
status = '200 OK'
res = "Hello world!"
response_headers = [
('Content-type','text/plain'),
('Content-Length',str(len(res)))]
start_response(status, response_headers)
@timo
timo / ADT.pm6
Last active December 22, 2019 08:56
working on algebraic data types in perl6
module ADT;
#package EXPORT::DEFAULT { };
grammar hs_adt {
has @.typevars;
rule TOP {
$<name>=<.ident> <params> '=' <definers>
}
rule params {
@geoff-parsons
geoff-parsons / live-update-chartjs.html
Created June 1, 2013 05:36
Example of live updating Chart.js charts.
<!DOCTYPE html>
<html>
<head>
<title>Chart.js Redraw Example</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="chart.min.js"></script>
<script type="text/javascript" charset="utf-8">
window.chartOptions = {
segmentShowStroke: false,
@DamonOehlman
DamonOehlman / README.md
Last active June 12, 2022 19:01
Provisioning of node + nginx designed for use with vagrant shell provisioner. No need for chef, puppet.

This is a simple shell script that is designed to provision both nginx and node on your machine. I primarily wrote it for use with Vagrant and an example Vagrantfile is included in the Gist as well.

@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active January 3, 2025 03:54
5 entertaining things you can find with the GitHub Search API
@renoirb
renoirb / init.yml
Last active March 30, 2023 03:15
How to install Oracle Java from ppa webupd8team/java using Salt stack, in ONE state file
#
# How to install automatically Oracle Java 7 under Salt Stack
#
# Thanks Oracle for complicating things :(
#
# 1. Create a java/ folder in your salt master
# 2. Paste this file in init.sls
# 3. salt '*' state.sls java
#
# Source:
@17twenty
17twenty / simple_git.md
Created September 27, 2013 18:32
A Simple Git branching model

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

The gist

@josecolella
josecolella / forum.py
Last active August 29, 2015 13:57
Forum Challenge TeamTreehouse
#!/usr/bin/env python3
# Author: Jose Miguel Colella
import urllib.request as http
import os.path
import re
import pprint
# The url of the essay
essayUrl = 'http://treehouse-forum-contests.s3.amazonaws.com/visualizing-information/part-one/essays-first-series.txt'
@oskyar
oskyar / deleteLineCsv.pl
Last active August 29, 2015 13:58
Elimina columnas o filas de un archivo .csv
#!/usr/bin/perl
# CopyRight 2014 Óscar Zafra ([email protected])
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@staltz
staltz / introrx.md
Last active May 15, 2025 10:37
The introduction to Reactive Programming you've been missing