Skip to content

Instantly share code, notes, and snippets.

View palmerabollo's full-sized avatar

Guido García palmerabollo

View GitHub Profile
@juliangruber
juliangruber / README.md
Last active March 24, 2021 02:00
lightweight node-websocketd

node-websocketd

A lightweight node port of websocketd, originally written in go.

Usage

node-websocketd --port=8080 ./count.sh
@quimcalpe
quimcalpe / gist:7626075
Last active May 28, 2023 16:41
Ansi Tables on console
var ansi = require("ansi");
var cursor = ansi(process.stdout);
var colors = [
"white", "black", "blue", "cyan", "green", "magenta", "red", "yellow", "grey",
"brightBlack", "brightRed", "brightGreen", "brightYellow", "brightBlue", "brightMagenta", "brightCyan", "brightWhite"
];
var styles = [ "bold", "italic", "underline", "inverse" ];
colors.forEach( function (color) {
@julionc
julionc / 00.howto_install_phantomjs.md
Last active February 1, 2026 03:05
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@jazlalli
jazlalli / gist:6510962
Created September 10, 2013 15:19
Example of a node-amqp subscriber with dead lettering
var amqpconnection = amqp.createConnection({url: config.CLOUD_AMQP}, connOptions);
amqpconnection.on('ready', function() {
// dead letter exchange for rejected messages
amqpconnection.exchange(
deadLetterExchange,
options = {durable: true, autoDelete: false, type: 'topic'},
function (ex) {
@floer32
floer32 / centos_python_env_setup
Last active May 2, 2022 03:47 — forked from stantonk/doit
CentOS 6: Install Python 2.7.4, pip, virtualenv, and virtualenvwrapper on CentOS (plus some bonus items at the end if you want). You should probably run with `sudo`.
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs
@jugyo
jugyo / gist:3882497
Created October 13, 2012 00:16
nginx + ngx_lua on Mac
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active March 30, 2026 20:20
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@jellea
jellea / gist:3438926
Created August 23, 2012 17:18
Webcam snapshot on every git commit
#!/bin/bash
#
# This script will make a webcam snapshot every commit. The jpg file will have
# the commit id as the filename.
#
# This script requires imagesnap. Install with: 'brew install imagesnap'
#
# Put this file in the '.git/hooks/' name it 'post-commit' and chmod it by:
# 'chmod +x .git/hooks/post-commit'
#
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active February 11, 2026 10:15
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active February 7, 2026 19:32 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.