Skip to content

Instantly share code, notes, and snippets.

View andyshinn's full-sized avatar
🖥️
don't put computers in your mouth

Andy Shinn andyshinn

🖥️
don't put computers in your mouth
View GitHub Profile
@remh
remh / gist:1426ccb24ec36162ba2b
Last active August 29, 2015 14:03
Datadog Agent 5.0.0

What is Datadog Agent 5.0.0 ?

Datadog Agent 5.0.0 is the next major version of the Datadog Agent. Its main improvement being that it will be self-contained. All dependencies required by the Agent to run will be part of the package.

Warning

This version of the Datadog-Agent is still in beta. It's planned to be released soon and is being used by us and a few of our users without any major issue but please keep in mind that it's a BETA version.

What issues will it solve ?

  • Conflicts with dependencies (Tornado, Supervisor, Check dependencies: MysqlDB, Postgres....)
  • On Centos 5, there is no forwarder which can create some issues (such as no proxy support for Dogstatsd). This will be solved
  • Full support of Fedora Core
@progrium
progrium / codep
Last active July 23, 2018 20:33
Creates a co-dependent process cluster, the first half of a "one for all" supervision strategy
#!/bin/bash
codep() {
set -eo monitor
trap 'kill $(jobs -p) &> /dev/null' EXIT
trap 'exit 2' CHLD
for child in "$@"; do
$child &
done
wait
@progrium
progrium / consulkv
Created June 4, 2014 22:21
Consul KV client, depends on jq
#!/bin/bash
CONSUL="localhost:8500"
main() {
case "$1" in
info)
curl -s "$CONSUL/v1/kv/$2" | jq -r .[]
;;
get)
@yuryoparin
yuryoparin / base64url.sh
Last active July 29, 2020 07:19
Base64url encoding
#! /bin/bash
table=(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 - _ =)
#text="{\"alg\":\"RS256\",\"typ\":\"JWT\"}"
#text="{\"iss\":\"761326798069-r5mljlln1rd4lrbhg75efgigp36m78j5@developer.gserviceaccount.com\",\"scope\":\"https://www.googleapis.com/auth/prediction\",\"aud\":\"https://accounts.google.com/o/oauth2/token\",\"exp\":1328554385,\"iat\":1328550785}"
read text
# breaking binary represantation of $text in to 6-bit blocks
@rosskevin
rosskevin / features-support-javascript.rb
Last active May 9, 2019 08:20
Continuous Integration, parallel_tests, cucumber, headless, capybara-webkit, chrome. For mac and linux.Conditionally @show chrome browser (:selenium) in development if @show tag is used, otherwise run headless and *always* run headless in a CI environment regardless of the tag's presence. Check javascript errors automatically when using webkit.
# verified against log_in.feature for blake
# https://github.com/jnicklas/capybara/issues/1443
# turn on webkit driver debug
$use_webkit = true
$use_chrome_instead_of_firefox = false
$webkit_debug = false
$wait_time = 5
def webkit_driver
if $webkit_debug
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@stevenharman
stevenharman / gist:2910960
Created June 11, 2012 16:16
Pivotal Tracker Activity Web Hook: event_type values
story_create
add_story_label
story_label_add
remove_story_label
story_label_remove
comment_create
comment_delete
story_move_multi
multi_story_delete
story_delete_multi