Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Gose gose

View GitHub Profile
View ws-index.rb
require 'elastic-workplace-search'
require 'json'
Elastic::WorkplaceSearch.access_token = 'my-access-token'
client = Elastic::WorkplaceSearch::Client.new
Elastic::WorkplaceSearch.endpoint = 'https://my-endpoint.ent-search.us-central1.gcp.cloud.es.io/api/ws/v1'
content_source_key = 'my-source-key'
documents = []
View AWS Disk Benchmarks
instance_type disks type raid host read-iops write-iops read-bw write-bw r_clat_avg w_clat_avg r_clat_std w_clat_std
------------- ----- ---- ---- ---- --------- ---------- ------- --------- ---------- ---------- ---------- ----------
d2.4xlarge 12 hdd 0 host-1 1 K 1 K 5 MiB/s 5 MiB/s 22287 µs 6 µs 35213914 2622
d2.4xlarge 12 hdd 0 host-2 1 K 1 K 6 MiB/s 6 MiB/s 20316 µs 6 µs 33000972 2552
d2.4xlarge 12 hddro 0 host-1 2 K 0 K 8 MiB/s 0 MiB/s 15186 µs 0 µs 15261172 0
d2.4xlarge 12 hddro 0 host-2 2 K 0 K 8 MiB/s 0 MiB/s 14650 µs 0 µs 12725320 0
i3.2xlarge 1 nvmessd none host-1 98 K 98 K 385 MiB/s 385 MiB/s 307 µs 10 µs 3453502 29018
i3.2xlarge 1 nvme
View ILM Example
PUT _cluster/settings
{
"transient": {
"indices.lifecycle.poll_interval": "5s"
}
}
DELETE test*
GET _cat/indices/test*?v
GET _cat/shards/test*?v
View Send an SMS with Ruby using Twilio
#!/usr/bin/env ruby
require 'twilio-ruby'
client = Twilio::REST::Client.new("TWILIO_SID_HERE", "TWILIO_AUTH_HERE")
client.account.messages.create(
from: "YOUR_TWILIO_PHONE_HERE",
to: "PHONE_TO_SEND_SMS_TO_HERE",
body: "Hello, world!"
View Send an SMS with Ruby using Twilio
#!/usr/bin/env ruby
require 'twilio-ruby'
twilio_sid = "XXX"
twilio_auth = "YYY"
client = Twilio::REST::Client.new(twilio_sid, twilio_auth)
cpu = `uptime`.split(/load average: /)[1].split(/, /)[0]
mem = `free -m | grep Mem`.split
View gist:1aef72dcca4beb561ea8
### Keybase proof
I hereby claim:
* I am gose on github.
* I am gose (https://keybase.io/gose) on keybase.
* I have a public key whose fingerprint is 1E89 1C74 0E47 9775 4862 7AFF 0928 6AAE 0959 55E6
To claim this, I am signing this object:
View gist:4725809
[endeca@localhost discover-data-catalog-integration]$ deploy.sh --no-prompt --install-config install-config-discover.xml
------------------------------------------------------------------------------
Deployment Template installation script.
This script creates the directory structure for your
deployment and installs configuration files and scripts
into the directory structure.
02/06/2013 21:01:17 [deploy.pl] INFO: Starting deployment template
View install-config-discover.xml
<install app-name="Discover">
<deployment-path>/usr/local/endeca/Apps</deployment-path>
<base-module type="dgraph" />
<additional-module type="custom">
/usr/local/endeca/ToolsAndFrameworks/3.1.1/reference/discover-data-catalog-integration/deploy.xml
</additional-module>
<options>
<option name="eac-port">8888</option>
<option name="workbench-port">8006</option>
<option name="dgraph1Port">15000</option>
@gose
gose / endeca-cas
Last active Dec 12, 2015
Endeca CAS Startup Script: /etc/rc.d/init.d/endeca-cas
View endeca-cas
#!/bin/sh
#
# Oracle Endeca CAS
#
# chkconfig: 345 92 21
# description: Oracle Endeca CAS
#
################################################################################
#
# This is an example init.d service script for running Endeca automatically
@gose
gose / endeca-wb
Last active Dec 12, 2015
Endeca Workbench Startup Script: /etc/rc.d/init.d/endeca-wb
View endeca-wb
#!/bin/sh
#
# Oracle Endeca Workbench
#
# chkconfig: 345 91 21
# description: Oracle Endeca Workbench
#
################################################################################
#
# This is an example init.d service script for running Endeca automatically
You can’t perform that action at this time.