Skip to content

Instantly share code, notes, and snippets.

View ricardosasilva's full-sized avatar

Ricardo Almeida Silva ricardosasilva

View GitHub Profile
@BretFisher
BretFisher / pcat-install.sh
Last active February 6, 2024 14:41
On macOS: Install pygmentize and alias pcat for shell code syntax highlighting
# first install pygmentize to the mac OS X or macOS system with the built-in python
sudo easy_install Pygments
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc.
alias pcat='pygmentize -f terminal256 -O style=native -g'
@noteed
noteed / docker-tinc.md
Last active April 17, 2019 06:22
Docker - Tinc setup
@rdkls
rdkls / segment_variant.sh
Created October 11, 2013 09:38
ffmpeg command to product segmented variant m3u8 playlist
#!/bin/bash
basename=/mnt/warehouse/grouch_core/live/grouch_ramdisk
mkdir -p $basename/$1
(
cd $basename/$1
/usr/local/bin/ffmpeg -i rtmp://172.16.1.14/publish/$1 \
-acodec copy \
-f segment \
-flags -global_header \
-map 0 \
@mattweber
mattweber / README.txt
Created March 1, 2012 04:09
ElasticSearch Multi-Select Faceting Example
This is an example how to perform multi-select faceting in ElasticSearch.
Selecting multiple values from the same facet will result in an OR filter between each of the values:
(facet1.value1 OR facet1.value2)
Faceting on more than one facet will result in an AND filter between each facet:
(facet1.value1 OR facet1.value2) AND (facet2.value1)
I have chosen to update the counts for each facet the selected value DOES NOT belong to since we are performing an AND between each facet. I have included an example that shows how to keep the counts if you don't want to do this (filter0.sh).