Skip to content

Instantly share code, notes, and snippets.

Traceback (most recent call last):
File "dynamodump.py", line 481, in <module>
do_restore(conn, sleep_interval, args.srcTable, dest_table, args.writeCapacity)
File "dynamodump.py", line 350, in do_restore
batch_write(conn, sleep_interval, destination_table, put_requests)
File "dynamodump.py", line 123, in batch_write
response = conn.batch_write_item(request_items)
File "/usr/lib/python2.7/dist-packages/boto/dynamodb2/layer1.py", line 420, in batch_write_item
body=json.dumps(params))
File "/usr/lib/python2.7/dist-packages/boto/dynamodb2/layer1.py", line 2842, in make_request
#!/bin/env bash
while [ true ]; do
sleep 30
/uni/uniplaces/app/console uecode:qpush:receive feeds_offer_aggregates --no-debug --env=prod
/uni/uniplaces/app/console uecode:qpush:receive feeds_offer_aggregates --no-debug --env=prod
/uni/uniplaces/app/console uecode:qpush:receive feeds_offer_aggregates --no-debug --env=prod
/uni/uniplaces/app/console uecode:qpush:receive feeds_offer_aggregates --no-debug --env=prod
/uni/uniplaces/app/console uecode:qpush:receive feeds_offer_aggregates --no-debug --env=prod
/uni/uniplaces/app/console uecode:qpush:receive feeds_offer_aggregates --no-debug --env=prod
done
// ListBookingsByProviderID returns bookings data and related ids
func (Booking *Booking) ListBookingsByProviderID(
providerID,
stateCode string
) ([]*booking.Booking, *booking.BookingsResult, error) {
public class UniplacesIntegration {
@future (callout=true) // indicates that this is an asynchronous call
public static void postLead(string jsonLead) {
// debugging call, which you can check in debug logs
System.debug('jsonLead: ' + jsonLead);
// create an HTTPrequest object
HttpRequest req = new HttpRequest();
// set up the HTTP request with a method, endpoint, header, and body
req.setMethod('POST');
req.setEndpoint('https://core.uniplaces.com/api');
public class UniplacesIntegration {
@future (callout=true) // indicates that this is an asynchronous call
public static void postLead(string jsonLead) {
// debugging call, which you can check in debug logs
System.debug('jsonLead: ' + jsonLead);
// create an HTTPrequest object
HttpRequest req = new HttpRequest();
// set up the HTTP request with a method, endpoint, header, and body
req.setMethod('POST');
req.setEndpoint('https://core.uniplaces.com/api');
<html>
<head>
<title>Uniplaces salesforce lead</title>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
</head>
<body>
<form id="salesforce-form" action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="00D58000000HkPX">
<input type=hidden name="retURL" value="http://www.uniplaces.com">
<input type=hidden name="Lead_Stage__c" value="Virgin">
private function handleDisapproved(ReviewDisapproved $disapproved = null)
{
$values = array_merge(
[
'is_disapproved' => false,
'disapproved_reason' => null,
'disapproved_at' => null,
'disapproved_by' => null
],
$this->getReportingDatesFromDate('disapproved_at', null)
@mlimaloureiro
mlimaloureiro / alternative
Created December 29, 2015 16:17
Alternative to urlArgs
function excludeUrlArgs(excludedLibraries) {
var pathConfig = requirejs.s.contexts._.config.paths;
for (var key in pathConfig) {
if (pathConfig.hasOwnProperty(key)) {
if (excludedLibraries.indexOf(pathConfig[key]) > -1) {
continue;
}
pathConfig[key] = pathConfig[key] + '?bust=__GRUNTPREFIX__';
}
}
[mloureiro@ip-10-96-159-4 uniplaces-spa-jobs]$ sudo indexer --rotate --all
Sphinx 2.2.6-id64-release (r4843)
Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinx/sphinx.conf'...
indexing index 'offers'...
collected 27916 docs, 0.7 MB
sorted 0.2 Mhits, 100.0% done
total 27916 docs, 692243 bytes
{
"profiles": [
{
"name": "staging",
"region": "us-west-1",
"schedule": {
"monday": {
"start": 9,
"stop": 19
},