Skip to content

Instantly share code, notes, and snippets.

say "https://www.tropo.com/static/audio/troporocks.mp3"
# curl -u system -H "Content-Type: application/json" -X POST -d '{"name":"roberts app","voiceUrl":"https://gist.githubusercontent.com/robertlabrie/af0bca7881a6b7b6c067b569f8d89a76/raw/clickToCall.rb", "platform" : "scripting", "messagingUrl":"https://gist.githubusercontent.com/robertlabrie/af0bca7881a6b7b6c067b569f8d89a76/raw/clickToCall.rb"}' https://localhost:8080/rest/v1/applications
@robertlabrie
robertlabrie / repart
Created July 5, 2016 15:15
A bash script to automatically resize a disk ... because Centos6
#!/bin/bash
parted /dev/xvdf unit s print
#todo: detect OS type
start=`parted /dev/xvdf unit s print | grep primary | awk '{print $2}'`
echo $start
parted /dev/xvdf rm 1
parted /dev/xvdf mkpart primary ext4 2048s 100%
parted /dev/xvdf set 1 boot on
parted /dev/xvdf unit s print
e2fsck -f /dev/xvdf1
require 'net/http'
require 'uri'
require 'json'
# get the current status DB
begin
data = File.read('/tmp/sensudata')
data = JSON.parse(data)
rescue
data = {}
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://rbaqf28cn5.execute-api.us-east-1.amazonaws.com/prod/sug')
req = Net::HTTP::Post.new uri.path
data = `/usr/local/bin/temper-poll`
temp = ''
a = {
one: {
foo: 'bar',
biz: 'baz'
},
'hundred': 'thousand'
}
b = {
one: {
-->[root@sensu3 ~]$ yum list installed | grep sensu
sensu.x86_64 1:0.28.0-1.el6 @sensu
-->[root@sensu3 ~]$ yum install sensu
Loaded plugins: fastestmirror, presto, priorities
Setting up Install Process
Determining fastest mirrors
epel/metalink | 15 kB 00:00
* CentOS-Base: centos.mirror.constant.com
* CentOS-Updates: mirror.us.leaseweb.net
* epel: mirror.cogentco.com
@robertlabrie
robertlabrie / ConEmu.xml
Created August 23, 2017 23:14
ConEmu.xml
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2017-08-23 17:24:16" build="161009a">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Shells::cmd}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
deb http://repo.mysql.com/apt/debian/ jessie mysql-apt-config
deb http://repo.mysql.com/apt/debian/ jessie mysql-5.7
deb http://repo.mysql.com/apt/debian/ jessie mysql-tools
#deb http://repo.mysql.com/apt/debian/ jessie mysql-tools-preview
deb-src http://repo.mysql.com/apt/debian/ jessie mysql-5.7
time="2017-11-21T17:56:12Z" level=debug msg="pull queue item: 93: remove from backup"
time="2017-11-21T17:56:12Z" level=debug msg="pull queue item: 93: successfully removed from backup"
time="2017-11-21T17:56:12Z" level=info ip=171.71.172.23 latency=325.048862ms method=POST path="/hook" status=200 time="2017-11-21T17:56:12Z" user-agent="GitHub-Hookshot/aeb6012"
time="2017-11-21T17:56:13Z" level=info msg="ignoring hook. repo tropo-operations/hello-drone is disabled for pull_request events."
time="2017-11-21T17:56:13Z" level=info ip=171.71.172.23 latency=1.001658936s method=POST path="/hook" status=204 time="2017-11-21T17:56:13Z" user-agent="GitHub-Hookshot/aeb6012"
time="2017-11-21T17:56:19Z" level=debug msg="agent connected: cb2b88cf10ce: polling"
+ cat hello.txt
0s
2
Hello, Drone!!
0s
3
+ env
0s
4
DRONE_NETRC_MACHINE=sqbu-github.cisco.com