Skip to content

Instantly share code, notes, and snippets.

View pvgomes's full-sized avatar
:octocat:
Focusing

Paulo Victor L.L. Gomes pvgomes

:octocat:
Focusing
View GitHub Profile
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@markomafs
markomafs / ProgressBar.php
Last active August 29, 2015 13:59
Trait to Implement Progress Bar for CLI's
<?php
/**
* Progress Bar Trait
* @package Core\Traits
* @author Marco Souza<marco.souza@tricae.com.br>
*/
namespace Core\Traits;
# HINTS
## Add self to the docker group (run docker without sudo)
sudo gpasswd -a myusername docker
## Get container ID
alias dl='docker ps -l -q'
## Get container IP
docker inspect --format='{{ .NetworkSettings.IPAddress }}' `dl`
docker inspect `dl` | grep IPAddress | cut -d '"' -f 4
@jprante
jprante / es-1.2-settings.md
Last active March 20, 2020 02:42
Elasticsearch 1.2 settings and description
@rasathus
rasathus / gist:6b63f12bdf4f8d90b1e5
Last active April 26, 2017 18:10
saltstack/salt #18302 Test Output
Using salt package 2014.7.0+ds-2trusty1
vagrant@vagrant-ubuntu-trusty-64:~$ sudo salt-call --local grains.items
local:
----------
SSDs:
biosreleasedate:
12/01/2006
biosversion:
VirtualBox
@fideloper
fideloper / update_curl.sh
Last active January 11, 2024 15:23
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2

Mastering Programming - by Kent Beck

From years of watching master programmers, I have observed certain common patterns in their workflows. From years of coaching skilled journeyman programmers, I have observed the absence of those patterns. I have seen what a difference introducing the patterns can make. Here are ways effective programmers get the most out of their precious 3e9 seconds on the planet. The theme here is scaling your brain. The journeyman learns to solve bigger problems by solving more problems at once. The master learns to solve even bigger problems than that by solving fewer problems at once. Part of the wisdom is subdividing so that integrating the separate solutions will be a smaller problem than just solving them together.

Time

Slicing - Take a big project, cut it into thin slices, and rearrange the slices to suit your context. I can always slice projects finer and I can always find new permutations of the slices that meet different needs

@souenzzo
souenzzo / deps.edn
Last active September 26, 2021 10:52
Clojure version of "java quickstart" from gsheets. https://developers.google.com/sheets/api/quickstart/java
;; run with
;; clj -Sdeps '{:deps {gdocs {:git/url "https://gist.github.com/souenzzo/df540002607b15378f8014237e499fdd" :sha "fee00617c75fc24c74931aa4200f74666c5b66b6"}}}' -m gdocs
{:paths ["."]
:deps {org.clojure/clojure {:mvn/version "1.10.0"}
com.google.api-client/google-api-client {:mvn/version "1.28.0"}
com.google.oauth-client/google-oauth-client-jetty {:mvn/version "1.28.0"}
com.google.apis/google-api-services-sheets {:mvn/version "v4-rev566-1.25.0"}}}