This file contains hidden or 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
require "formula" | |
class Kafka < Formula | |
homepage "http://kafka.apache.org" | |
url "http://www.apache.org/dyn/closer.cgi?path=/kafka/0.8.1/kafka_2.8.0-0.8.1.tgz" | |
sha1 "9613ca3dc6e4202015252ee89511a44c6145ed0c" | |
def default_log4j_properties | |
<<-EOS.undent |
This file contains hidden or 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
__weak QEventCell *weakCell = cell; | |
[cell.imageView setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:event.poster]] placeholderImage:[UIImage imageNamed:@"placeholder"] success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) { | |
weakCell.imageView.image = image; | |
[weakCell setNeedsLayout]; | |
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) { | |
}]; |
This file contains hidden or 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
root@ivi:/www/b2c/public_html# gdb --args /root/dev/hhvm/hphp/hhvm/hhvm --config /etc/hhvm/server.hdf --user root --mode server -vEval.SyncGdbChunks=1 -vEval.JitNoGdb=false | |
GNU gdb (GDB) 7.6.1-ubuntu | |
Copyright (C) 2013 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... |
This file contains hidden or 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
#!/usr/local/bin/node | |
var HOST = 'http://google.com', | |
http = require('http'), | |
zlib = require('zlib'); | |
var request = function(path, callback) { | |
var buffer = []; | |
This file contains hidden or 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
async.map(catalog_pages, parseCatalogPage, function(error, results) { | |
var goods = []; | |
_.each(results, function(items) { | |
goods = _.union(goods, items); | |
}); | |
}); |
This file contains hidden or 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
NSURL *url = [NSURL URLWithString:@"http://url/login/"]; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; | |
[request setHTTPMethod:@"POST"]; | |
NSMutableString *postData = [[NSMutableString alloc] init]; | |
[postData appendString:@"first_name="]; | |
[postData appendString:[info objectForKey:@"first_name"]]; | |
[postData appendString:@"&last_name="]; | |
[postData appendString:[info objectForKey:@"last_name"]]; | |
[postData appendString:@"&uid="]; |
This file contains hidden or 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
$app->get('/logout', function() use ($app) { | |
if ($app['session']->isStarted()) { | |
$app['session']->clear(); | |
} | |
return $app->redirect("/"); | |
}) | |
->after(function(\Symfony\Component\HttpFoundation\Request $request, | |
\Symfony\Component\HttpFoundation\Response $response) use ($app) { | |
$response->headers->clearCookie($app['session']->getName()); | |
}); |
This file contains hidden or 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
$app->post('/login', function() use ($app) { | |
if (!$app['session']->isStarted()) { | |
$app['session']->start(); | |
} | |
return $app->redirect("/"); | |
}); |
This file contains hidden or 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
$app->before(function (\Symfony\Component\HttpFoundation\Request $request) use ($app) { | |
if ($request->cookies->has($app['session']->getName())) { | |
$app['session']->start(); | |
} | |
}); |
This file contains hidden or 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
/* | |
RequireJS 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. | |
Available via the MIT or new BSD license. | |
see: http://github.com/jrburke/requirejs for details | |
*/ | |
var requirejs,require,define; | |
(function(Y){function x(b){return J.call(b)==="[object Function]"}function G(b){return J.call(b)==="[object Array]"}function q(b,c){if(b){var e;for(e=0;e<b.length;e+=1)if(b[e]&&c(b[e],e,b))break}}function N(b,c){if(b){var e;for(e=b.length-1;e>-1;e-=1)if(b[e]&&c(b[e],e,b))break}}function y(b,c){for(var e in b)if(b.hasOwnProperty(e)&&c(b[e],e))break}function K(b,c,e,i){c&&y(c,function(c,j){if(e||!b.hasOwnProperty(j))i&&typeof c!=="string"?(b[j]||(b[j]={}),K(b[j],c,e,i)):b[j]=c});return b}function s(b, | |
c){return function(){return c.apply(b,arguments)}}function Z(b){if(!b)return b;var c=Y;q(b.split("."),function(b){c=c[b]});return c}function $(b,c,e){return function(){var i=fa.call(arguments,0),g;if(e&&x(g=i[i.length-1]))g.__requireJsBuild=!0;i.push(c);return b.apply(null,i)}}function aa(b,c,e){q([[" |