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
# list all current branch names | |
function gBa | |
set -lx root ~/go/src/github.com/saltside | |
for r in (ls -1 $root) | |
if ! test -d $root/$r | |
continue | |
end | |
cd $root/$r |
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
⟩ curl -v 'http://api.pay.bk.ikmanit.com/Bikroy_Adapters/v1/pay_invoice?ref_no=990210792' [06:07:49] | |
* Trying 52.163.191.103... | |
* TCP_NODELAY set | |
* Connected to api.pay.bk.ikmanit.com (52.163.191.103) port 80 (#0) | |
> GET /Bikroy_Adapters/v1/pay_invoice?ref_no=990210792 HTTP/1.1 | |
> Host: api.pay.bk.ikmanit.com | |
> User-Agent: curl/7.64.1 | |
> Accept: */* | |
> | |
< HTTP/1.1 302 |
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
package messager | |
// Messager is a struct handling messaging of various types. | |
type Messager struct { | |
sms SMS | |
} | |
// SendHelloWorld sends a Hello world SMS. | |
func (m *Messager) SendHelloWorld(number int) error { | |
err := m.sms.Send(number, "Hello, world!") |
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
<html> | |
<head> | |
<title>PHP JSON test</title> | |
</head> | |
<body> | |
<h1>PHP JSON test</h1> | |
<?php | |
$json_data = file_get_contents("http://192.168.1.6:9090/users/4d3e75b3-3b84-4f6b-983d-30635ce06585"); | |
$data = json_decode($json_data, true); |
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
{ | |
"AWSTemplateFormatVersion":"2010-09-09", | |
"Description":"This is a sample CloudFormation template for deploying Dynamic DynamoDB. This package will be installed from the Python Package Index repository. For more information, see http://dynamic-dynamodb.readthedocs.org.", | |
"Parameters":{ | |
"S3Bucket":{ | |
"Type":"String", | |
"Default":"s3://bucket-name/folder-path-if-applicable/", | |
"Description":"Remove this default value and enter your pre-created S3 Bucket url upto folder name. (Please include the trailing /. Example: https://s3.amazonaws.com/my-bucket/ should be input as s3://my-bucket/). It will be used for storing a copy of Dynamic DynamoDB configuration file." | |
}, | |
"S3BucketRegion":{ |
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
2014-11-06 20:00:57,050 - dynamic-dynamodb - DEBUG - dryrun - Authenticating to SNS using credentials in configuration file | |
2014-11-06 20:00:57,051 - dynamic-dynamodb - DEBUG - dryrun - Connected to SNS in eu-west-1 | |
2014-11-06 20:00:57,052 - dynamic-dynamodb - DEBUG - dryrun - Authenticating to DynamoDB using credentials in configuration file | |
2014-11-06 20:00:57,053 - dynamic-dynamodb - DEBUG - dryrun - Connected to DynamoDB in eu-west-1 | |
2014-11-06 20:00:57,088 - dynamic-dynamodb - DEBUG - dryrun - Authenticating to CloudWatch using credentials in configuration file | |
2014-11-06 20:00:57,090 - dynamic-dynamodb - DEBUG - dryrun - Connected to CloudWatch in eu-west-1 | |
2014-11-06 20:00:57,319 - dynamic-dynamodb - DEBUG - dryrun - Table prod-displays-20141105 did not match with config key ^prod-displays-20141106$ | |
2014-11-06 20:00:57,319 - dynamic-dynamodb - DEBUG - dryrun - Table prod-displays-20141106 match with config key ^prod-displays-20141106$ | |
2014-11-06 20:00:57,319 - dynamic-dynamodb - DEBUG - dryrun - Table |
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
def fibonacci(): | |
""" Generator yielding Fibonacci numbers | |
:returns: int -- Fibonacci number as an integer | |
""" | |
x, y = 0, 1 | |
while True: | |
yield x | |
x, y = y, x + y |
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
""" Quicksort implementation """ | |
def quicksort(arr): | |
""" Quicksort a list | |
:type arr: list | |
:param arr: List to sort | |
:returns: list -- Sorted list | |
""" |
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 threading | |
import time | |
class ThreadingExample(object): | |
""" Threading example class | |
The run() method will be started and it will run in the background | |
until the application exits. | |
""" |
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 boto.dynamodb2.layer1 import DynamoDBConnection | |
connection = DynamoDBConnection( | |
aws_access_key_id='foo', # Dummy access key | |
aws_secret_access_key='bar', # Dummy secret key | |
host='localhost', # Host where DynamoDB Local resides | |
port=8000, # DynamoDB Local port (8000 is the default) | |
is_secure=False) # Disable secure connections |
NewerOlder