Skip to content

Instantly share code, notes, and snippets.

View ph's full-sized avatar
💭
Where is the Microsoft Paperclip?

Pier-Hugues Pellerin ph

💭
Where is the Microsoft Paperclip?
View GitHub Profile
@jsvd
jsvd / gist:c4b030daf6c76ca8b77a
Last active August 29, 2015 14:13
list plugins that have diferences between the last tag and master
# needs a repos variable with a list of organization/plugin items
echo "repository,last_tag,commits_ahead_master,changes_against_master"
for repo in "${repos[@]}"; do
last_tag=`curl -u "$CREDENTIALS" -s https://api.github.com/repos/$repo/tags | jq -r ".[0].name"`
if [ $last_tag == "null" ]; then
continue
fi
ahead_commits=`curl -u "$CREDENTIALS" -s https://api.github.com/repos/$repo/compare/$last_tag...master | jq -r ".ahead_by"`
if [ $ahead_commits != "null" ] && [ "$ahead_commits" -gt 0 ]; then
anonymous
anonymous / kafka.sh
Created March 23, 2015 21:24
#!/bin/bash
KAFKA_URL='http://mirror.cogentco.com/pub/apache/kafka/0.8.2.1/kafka_2.10-0.8.2.1.tgz'
KAFKA_HOME='/tmp/kafka-es'
DATA_DIR_KAFKA='/tmp/kafka-logs'
DATA_DIR_ZOOKEEPER='/tmp/zookeeper'
ZOOKEEPER_PID=$KAFKA_HOME/zookeeper.pid
KAFKA_PID=$KAFKA_HOME/kafka.pid
require "benchmark/ips"
require "granola"
require "json"
require "msgpack"
require "multi_json"
require "oj"
require "yajl"
User = Struct.new(:name, :age)
anonymous
anonymous / kafka.sh
Created May 15, 2015 20:09
#!/bin/bash
KAFKA_URL='http://mirror.cogentco.com/pub/apache/kafka/0.8.2.1/kafka_2.10-0.8.2.1.tgz'
KAFKA_HOME='/tmp/kafka-es'
DATA_DIR_KAFKA='/tmp/kafka-logs'
DATA_DIR_ZOOKEEPER='/tmp/zookeeper'
ZOOKEEPER_PID=$KAFKA_HOME/zookeeper.pid
KAFKA_PID=$KAFKA_HOME/kafka.pid
@jsvd
jsvd / lpv.rb
Last active March 18, 2021 10:51
logstash plugin version
#!/usr/bin/env ruby
# use ./lpv.rb logstash_version plugin_name
#
# example:
# % ./lpv.rb 5.2.0 logstash-output-elasticsearch
# logstash-output-elasticsearch 6.2.4 https://github.com/logstash-plugins/logstash-output-elasticsearch/tree/v6.2.4
require 'net/http'
@graphaelli
graphaelli / aws-session-env.py
Created December 29, 2017 18:21
Export environment variables for AWS cli w/MFA.
#!/usr/bin/env python
"""Export environment variables for AWS cli w/MFA.
eval $(aws-session-env.py $1)
"""
import argparse
import os
import boto3