This file contains 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
-define(TEST_PAYLOAD_HTTP_JSON, <<"{\"version\": \"0.0.1\", \"description\": \"cookbook update\", \"notification_type\": \"http\", \"timestamp\": \"2014-06-05T10:52Z\", \"delivery_options\": {\"url\": \"http://blah.com/updates\"}, \"type\": \"notification\", \"id\": \"04ab8499-0188-11e4-a7f5-8438354265f6\", \"data\": {\"organization_name\": \"foobarorg\", \"requestor_type\": \"user\", \"task\": \"update\", \"parent_name\": \"redis\", \"entity_name\": \"2.3.1\", \"recorded_at\": \"timestamp\", \"parent_type\": \"cookbook\", \"entity_type\": \"version\", \"requestor_name\": \"fooman\"}}">>). | |
-define(TEST_PAYLOAD_HTTP, {[{<<"type">>, <<"notification">>}, | |
{<<"version">>, <<"0.0.1">>}, | |
{<<"id">>, <<"04ab8499-0188-11e4-a7f5-8438354265f6">>}, | |
{<<"timestamp">>, <<"2014-06-05T10:52Z">>}, | |
{<<"notification_type">>, <<"http">>}, | |
{<<"description">>, <<"cookbook update">>}, | |
This file contains 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
21:13:21.668940 <0.92.0> amqp_gen_consumer:handle_call/3 --> {reply,ok, | |
{state, | |
amqp_selective_consumer, | |
{state, | |
{dict,1,16, | |
16,8,80,48, | |
{[],[],[],[], | |
[],[],[],[], | |
[],[],[],[], | |
[],[],[],[]}, |
This file contains 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
# A simple Makefile alternative to using Grunt for your static asset compilation | |
# | |
## Usage | |
# | |
# $ npm install | |
# | |
# And then you can run various commands: | |
# | |
# $ make # compile files that need compiling | |
# $ make clean all # remove target files and recompile from scratch |
This file contains 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
# Makefile for a go project | |
# | |
# Author: Jon Eisen | |
# site: joneisen.me | |
# | |
# Targets: | |
# all: Builds the code | |
# build: Builds the code | |
# fmt: Formats the source files | |
# clean: cleans the code |
This file contains 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
``` | |
alex@amba001:~/workspace/dev/tower3/ops/aws-ami-tools $ rake cloud:aws:instances:ssh_command[10] tags="Name:*worker*prod2*" command="tail -n 1000 /var/log/tower3/worker-service.log | grep ERROR" as_user="ubuntu" | |
[ec2-54-205-68-127.compute-1.amazonaws.com] 2013-11-08 21:02:21,996 - ERROR - worker:25044, queueId:668ddc61-3320-4ff5-9d91-03c17d6b0904, jobId:1b72bc40-67a8-4a9d-b070-b4b8dd78f314, action:failed, error:fetch-error, errorMsg:HTTP Error 404: Not Found, bot:fileio | |
[ec2-54-205-68-127.compute-1.amazonaws.com] 2013-11-08 21:04:45,562 - ERROR - worker:25046, queueId:668ddc61-3320-4ff5-9d91-03c17d6b0904, jobId:d7ff5b74-68e8-49f6-81fc-58d67381c06d, action:failed, error:invalid-job, errorMsg:{'operation.params': 'need sizeX and sizeY'}, bot:fileio | |
[ec2-54-205-68-127.compute-1.amazonaws.com] 2013-11-08 21:05:15,580 - ERROR - worker:25044, queueId:668ddc61-3320-4ff5-9d91-03c17d6b0904, jobId:1d902c3a-07a9-43ba-b936-e15654bc6f9b, action:failed, error:invalid-job, errorMsg:{'operation.params': 'need sizeX and s |
This file contains 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
import requests | |
from requests.auth import OAuth1 | |
import json | |
client_key = u'9fac88f8645bdfbd6f8a68f60c5130d082244a8a8787674e82e85f68ff3716b8' | |
client_secret = u'bc0cd9097930832c6308e76ae3600b8d4aff47d2190df4960abc35208d291fc0' | |
headeroauth = OAuth1( | |
client_key, |
This file contains 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
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# | |
# USAGE: |
This file contains 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
from couchbase.client import Couchbase | |
def profile_insert_doc(): | |
couchbase = Couchbase( | |
"localhost:8091", | |
"default", "" | |
) | |
bucket = couchbase["default"] | |
key = "test_key" |
This file contains 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
from couchbase.client import Couchbase | |
def insert_doc(): | |
couchbase = Couchbase("localhost:8091", "account", "") | |
bucket = couchbase["account"] | |
key = "test_key" | |
val = "test_val" | |
bucket.set(key, 0, 0, val) |
This file contains 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 Mongolian = require("mongolian") | |
var server = new Mongolian | |
var db = server.db("myDatabaseName") | |
var myCollectionName = db.collection("myCollectionName") |
NewerOlder