Skip to content

Instantly share code, notes, and snippets.

View amitaibu's full-sized avatar

Amitai Burstein amitaibu

View GitHub Profile
drush sqlq "SHOW TABLES LIKE '_raw_%';" | awk -v ORS=, '{ print $1 }' | sed 's/,$//' | sed 's/^Tables_in_[^,]*,//' | drush sql-dump > raws.sql
"UniqueID","Title","Summary|type:varchar|length:500","Content|type:text|size:big","Date","Chinese Description|type:text|size:big","Path","Hebrew keywords","Category","Sub category","Sorting","Weight","Images|type:varchar|length:500","Related articles","Writer","Editor","Translator","Source","Coordinate","Zoom Level","Hidden","Province"
{"timestamp":1421780440,"type":"php","ip":"::1","request_uri":"http:\/\/localhost\/d7_dev\/index.php?XDEBUG_SESSION_START=11960","referer":"","uid":"1","link":"","message":"Exception: Improved exception in devel_init() (line 403 of \/Applications\/MAMP\/htdocs\/d7_dev\/sites\/all\/modules\/devel\/devel.module).","exception_trace":[{"function":"devel_init","args":[]},{"file":"\/Applications\/MAMP\/htdocs\/d7_dev\/includes\/module.inc","line":895,"function":"call_user_func_array","args":["devel_init",[]]},{"file":"\/Applications\/MAMP\/htdocs\/d7_dev\/includes\/common.inc","line":5193,"function":"module_invoke_all","args":["init"]},{"file":"\/Applications\/MAMP\/htdocs\/d7_dev\/includes\/bootstrap.inc","line":2278,"function":"_drupal_bootstrap_full","args":[]},{"file":"\/Applications\/MAMP\/htdocs\/d7_dev\/index.php","line":20,"function":"drupal_bootstrap","args":[7]}],"uuid":"IMAC"}
<?php
/**
* @file
* Loggly HTTP module.
*/
define('LOGGLY_HTTP_LOG', 'http://logs-01.loggly.com/inputs/');
/**
$handler = restful_get_restful_handler('tracking');
$request = array('label' => 'foo');
$result = $handler->patch('', $request);
74a8a03c2194efce7613defd138a5a8fbd944090
# Varnish caching
## List of 300 items
Requests per second: 6717.35 [#/sec] (mean) # RESTful Memcache render cache.
Requests per second: 7096.14 [#/sec] (mean) # RESTful Database render cache.
Requests per second: 6379.45 [#/sec] (mean) # RESTful No render cache.
Requests per second: 95.24 [#/sec] (mean) # RESTWS
Requests per second: 1125.62 [#/sec] (mean) # Services
## List of 50 items
Requests per second: 6632.03 [#/sec] (mean) # RESTful Memcache render cache.
Requests per second: 7057.74 [#/sec] (mean) # RESTful Database render cache.
angular.module('hf.events.builder', [
'app.resources',
'app.values'
])
.factory('EventBuilder', function ($injector, $window, apiUrl) {
var EventBuilder = function EventBuilder(message) {
this['@timestamp'] = new Date();
this['@message'] = message || '';
return this;
};
@amitaibu
amitaibu / imgur
Last active August 29, 2015 14:12 — forked from vivien/imgur
#!/bin/sh
#
# Upload image(s) to imgur.com
# Copyright (C) 2014 Vivien Didelot <[email protected]>
# Licensed under GPL version 3, see http://www.gnu.org/licenses/gpl.txt
#
# Requires "jshon":
# http://kmkeen.com/jshon/
#
# Alternatives, which suck:
<?php
/**
* Implements hook_form_FORM_ID_alter()
*/
function foo_form_id_alter(&$form, $form_state) {
$form['#after_build'] = array('foo_form_id_after_build');
}
/**