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
# Very simple load testing script. Will invoke a given url X number of times | |
# example usage: ./loadtest.sh 25 "http://localhost:3000/my-url" | |
max="$1" | |
date | |
echo "url: $2 | |
rate: $max calls / second" | |
START=$(date +%s); | |
get () { | |
curl -s -v "$1" 2>&1 | tr '\r\n' '\\n' | awk -v date="$(date +'%r')" '{print $0"\n-----", date}' >> /tmp/perf-test.log |
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
const https = require('https'); | |
const AUTHORIZATION = ''; // base 64 of user:password | |
const BITBUCKET_USER = ''; // either the user or the org that owns the repo | |
const PERCY_USER = ''; // the name of your percy user or org | |
exports.handler = (event, context, callback) => { | |
/** | |
We need to post to a URL like this: | |
https://api.bitbucket.org/2.0/repositories/<user>/<repo>/commit/<hash>/statuses/build |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
names: [1, 2], | |
actions: { | |
foo(){} | |
} | |
}); |
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 Ember from 'ember'; | |
export default Ember.Route.extend({ | |
init() { | |
this._super(...arguments); | |
$.mockjax({ | |
url: '/parents', | |
responseText: { | |
name: "someText" |
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
- (void) getPriceInfo{ | |
// Initialize HTTPClient | |
NSURL *baseURL = [NSURL URLWithString:@"http://localhost"]; | |
AFHTTPClient* client = [[AFHTTPClient alloc] initWithBaseURL:baseURL]; | |
[client setDefaultHeader:@"Accept" value:RKMIMETypeJSON]; | |
// Initialize RestKit | |
RKObjectManager *objectManager = [[RKObjectManager alloc] initWithHTTPClient:client]; | |
// Initialize managed object store |
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
/* | |
Testing the af.updateFeatureFlags method, which returns an AFJSONRequestOperation operation | |
*/ | |
- (void) testFeatureFlags{ | |
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); | |
[af.sharedHTTPClient enqueueBatchOfHTTPRequestOperations:@[af.updateFeatureFlags] progressBlock:nil completionBlock:^(NSArray *operations) { | |
dispatch_semaphore_signal(semaphore); | |
}]; |