Skip to content

Instantly share code, notes, and snippets.

View bdwill's full-sized avatar
⚜️

Brandon Willmott bdwill

⚜️
View GitHub Profile
@bdwill
bdwill / pureelk-compose.yaml
Created March 29, 2017 19:32
Docker Compose v3 for PureELK
version: "3"
services:
pureelk:
image: pureelk/pureelk
ports:
- "8080:8080"
logging:
options:
max-size: 100m
@bdwill
bdwill / gist:04b5ab61c200eaaa8af41c5d756a3d27
Created February 19, 2017 22:59
Ruby Rest-Client Test
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(
@bdwill
bdwill / gist:48daa290c3f9a7288e75b86457526f9b
Created February 19, 2017 05:01
Ruby gem example for Twitter
# 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 December 1, 2015 15:30
Interacting with Twitter API using Twitter ruby gem
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
@bdwill
bdwill / gist:10404596
Last active August 27, 2016 19:26
keybase.md
### 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: