An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
sudo chown ${USER}:staff /usr/local/var/postgres | |
initdb /usr/local/var/postgres -E utf8 | |
createdb |
{:timestamp=>"2016-01-04T14:48:18.760000+0000", :level=>:warn, "INFLIGHT_EVENT_COUNT"=>{"input_to_filter"=>20, "total"=>20}, "STALLING_THREADS"=>{["LogStash::Filters::Grok", {"patterns_dir"=>["/opt/logstash/patterns/lograge"], "match"=>{"message"=>"%{LOGRAGE}"}}]=>[{"thread_id"=>20, "name"=>"|filterworker.0", "current_call"=>"[...]/vendor/bundle/jruby/1.9/gems/jls-grok-0.11.2/lib/grok-pure.rb:177:in `match'"}, {"thread_id"=>21, "name"=>"|filterworker.1", "current_call"=>"[...]/vendor/bundle/jruby/1.9/gems/jls-grok-0.11.2/lib/grok-pure.rb:177:in `match'"}, {"thread_id"=>22, "name"=>"|filterworker.2", "current_call"=>"[...]/vendor/bundle/jruby/1.9/gems/jls-grok-0.11.2/lib/grok-pure.rb:177:in `match'"}, {"thread_id"=>23, "name"=>"|filterworker.3", "current_call"=>"[...]/vendor/bundle/jruby/1.9/gems/jls-grok-0.11.2/lib/grok-pure.rb:177:in `match'"}]}} | |
{:timestamp=>"2016-01-04T14:48:22.192000+0000", :level=>:warn, "INFLIGHT_EVENT_COUNT"=>{"input_to_filter"=>20, "total"=>20}, "STALLING_THREADS"=>{["LogStash::Filter |
input { stdin { } } | |
filter { | |
grok { | |
match => { "message" => "%{LOGRAGE}" } | |
} | |
} | |
output { | |
elasticsearch { hosts => ["localhost:9200"] } |
#!/bin/sh -x | |
# Locally delete a upstream merged branch | |
# usage: | |
# merged | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || exit 0 | |
CURRENT="${ref#refs/heads/}" | |
git checkout master | |
git pull origin master |
error = OpenStruct.new(params: ["foo"], message: "bar") | |
raise Grape::Exceptions::ValidationErrors, errors: [error] |
/opt/logstash/bin/logstash -w 4 -f /etc/logstash/conf.d/logstash.conf | |
tail -f /var/log/logstash/logstash.log/.stdout | |
sudo /usr/bin/filebeat -e -v | |
Installing patron 0.4.20 with native extensions | |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
/home/ubuntu/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20151121-13137-yck58r.rb extconf.rb | |
checking for curl-config... no | |
checking for main() in -lcurl... no | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of necessary | |
libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. |
--- | |
swagger: '2.0' | |
################################################################################ | |
# API Information # | |
################################################################################ | |
info: | |
version: v1 | |
title: Instagram API | |
description: | |
if [[ $BUILD_STATUS == "success" ]] | |
then | |
export STATUS="success" | |
else | |
export STATUS="failure" | |
fi | |
curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \ | |
-H "Content-Type: application/json" \ | |
-X POST \ |