Skip to content

Instantly share code, notes, and snippets.

View billwestfall's full-sized avatar
🤔
thinkin'

Bill Westfall billwestfall

🤔
thinkin'
View GitHub Profile
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@billwestfall
billwestfall / es_questions.md
Last active February 16, 2016 01:11
ES_questions
  1. how to manage many visualization links? especially those that cross Kibana URLs, or even need to include Grafana URLs
  2. we're using a mix of Grafana for timed events and Kibana for other metrics. would you recommend using this mix of frontends, or is there a better way to do it?
  3. any way to insert a visual or data from another source (like Grafana into Kibana), or would you recommend a third page to aggregate all of this information?
  4. Is there an easy way to designate the time frame in the search in Kibana (now - 1 week, now - 12 hours , etc.)? Or other recommended way of doing this? Possibly not use the default date histogram as X axis?
  5. Any way to delete protect and index without admin access to the server? Was wondering if this would be possible with an AWS ES domain
  6. any minimal index recommendations you have for data coming in? we have a very wide mix of types of data in our indexes, wondering if there is a downside to mixing this disparate amount, quality of data
@billwestfall
billwestfall / gist:93e4f2036f559be45580ad5fde9a14cb
Created July 26, 2017 20:56
Print random string of (1-100) characters to terminal every 15 seconds
while (my_rand=$(gshuf -i 1-100 -n 1); cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w $my_rand | head -n 1); unset my_rand; do sleep 15; done
@billwestfall
billwestfall / random_sample
Last active August 21, 2017 02:57
Random sample with Mathematica
ord = {Arpit, Motikant, Shobhit, Shravan, Bill, Bobby}; RandomSample[ord]
For[i = 1; t = x, i < 10, i++, t = Prime[i] ; Print[t]; Timing[Pause[5]]]
For[i = 1; t = x, i < 10, i++, t = RandomReal[{-10,i}] ; Print[t]; Timing[Pause[5]]]
> i <- 2
> repeat {if (i > 24) break else {print(i); Sys.sleep(1); i <- i + 2;}}
RandomInteger[{1,670}]

cd /Users/billw/go/src/github.com/grafeas/grafeas/samples/server/go-server/api/server/main

go run main.go

cd /Users/billw/go/src/github.com/grafeas/client-go/example/v1alpha1

go run main.go

cd Users/billw/Documents/old/github_new/Grafeas/v1alpha1

import System.Random
g <- newStdGen
randomR (1, 624) g
-- rerun the last two steps for new random seed