This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package parsing | |
import ( | |
"encoding/xml" | |
"io" | |
"log" | |
"reflect" | |
"code.google.com/p/go-charset/charset" | |
_ "code.google.com/p/go-charset/data" // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var socket = new WebSocket(r.thebutton._websocket._url); | |
socket.onmessage = function (event) { | |
payload = JSON.parse(event.data).payload; | |
console.log(payload.seconds_left); | |
if (payload.seconds_left == 1.0) { | |
document.getElementById('thebutton').click(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! function(e) { | |
t = 0; | |
for (n in e) "object" == typeof e[n] && (p = e[n].getElementsByClassName("amountColumn")[0].innerText, t += Number(p.replace(/[^0-9\.]+/g, ""))) | |
console.log(t) | |
}(document.getElementsByClassName("totalRow")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Arcanist < Formula | |
version "master" | |
desc "Phabricator Arcanist Tool" | |
homepage "https://secure.phabricator.com/book/phabricator/article/arcanist/" | |
url "https://github.com/phacility/arcanist/archive/master.tar.gz" | |
sha256 "b9cdacaf06c1a6f817e450a5d16e9b0a531f8d68cefa33c83c0a6646ae3e42a3" | |
resource "libphutil" do | |
url "https://github.com/phacility/libphutil/archive/master.tar.gz" | |
sha256 "fc01b48bc922a660e46b4fe1ae5f42862e02c5a0bf3ff51d76ab95a5cc45252c" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| => brew install arcanist | |
Error: arcanist is a head-only formula | |
Install with `brew install --HEAD arcanist` | |
/usr/local @ michael (mschuett) | |
| => brew install --HEAD arcanist | |
==> Cloning https://github.com/phacility/arcanist.git | |
Updating /Library/Caches/Homebrew/arcanist--git | |
==> Checking out branch master | |
==> Downloading https://github.com/phacility/libphutil/archive/master.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/arcanist--libphutil-HEAD.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Directory structure | |
playbook.yml | |
inventory_file | |
ansible-rabbitmq/ | |
# command run ansible-playbook playbook.yml -i vagrant | |
# ansible-rabbitmq is this repo https://github.com/nowait-tools/ansible-rabbitmq/tree/galaxy-test | |
# using galaxy test branch for testing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
False | |
<type 'NoneType'> | |
kernel | |
False | |
<type 'NoneType'> | |
instance_profile | |
False | |
<type 'unicode'> | |
root_device_type | |
False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def todict(obj, classkey=None): | |
if isinstance(obj, dict): | |
data = {} | |
for (k, v) in obj.items(): | |
data[k] = todict(v, classkey) | |
return data | |
elif hasattr(obj, "_ast"): | |
return todict(obj._ast()) | |
elif hasattr(obj, "__iter__"): | |
return [todict(v, classkey) for v in obj] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[localhost] | |
default ansible_ssh_host=127.0.0.1 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "private_network", ip: "192.168.56.101" | |
config.vm.provider "virtualbox" do |vm| |