Skip to content

Instantly share code, notes, and snippets.

Avatar
⚜️

Brandon Willmott bdwill

⚜️
View GitHub Profile
@bdwill
bdwill / pureelk-compose.yaml
Created Mar 29, 2017
Docker Compose v3 for PureELK
View pureelk-compose.yaml
version: "3"
services:
pureelk:
image: pureelk/pureelk
ports:
- "8080:8080"
logging:
options:
max-size: 100m
View gist:04b5ab61c200eaaa8af41c5d756a3d27
require 'rubygems'
require 'rest_client'
login = RestClient::Request.execute(
:method => :post,
:url => 'https://10.1.1.1/api/1.9/auth/session',
:payload => { api_token: 'xxxxxxxxxxxxxxxxxxx' },
:verify_ssl => false)
response = RestClient::Request.execute(
View gist:48daa290c3f9a7288e75b86457526f9b
# TwitterTrends.rb
# From http://www.alphadevx.com/a/88-Writing-a-REST-Client-in-Ruby
require 'rubygems'
require 'rest_client'
require 'json'
class TwitterTrends
# the URL for the Twitter Trends endpoint
@url
@bdwill
bdwill / gist:f9a60b6281e5b6f0ef08
Created Dec 1, 2015
Interacting with Twitter API using Twitter ruby gem
View gist:f9a60b6281e5b6f0ef08
require 'twitter'
require 'json'
client = Twitter::REST::Client.new do |config|
config.consumer_key = "..."
config.consumer_secret = "..."
config.access_token = "..."
config.access_token_secret = "..."
end
View gist:10404596
### Keybase proof
I hereby claim:
* I am bdwill on github.
* I am bdwill (https://keybase.io/bdwill) on keybase.
* I have a public key whose fingerprint is FF1D 3A8C 49DE F247 40F1 D4E8 4D4D 6AB4 70B3 85EE
To claim this, I am signing this object: