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
I am trying to setup redis sentinel in 2 vms, this is my setup: | |
- 10.1.8.36 mymaster | |
- 10.1.8.46 resque (redis.conf = slaveof 10.1.8.36) | |
- in both mnachines /etc/redis-sentinel.conf | |
port 26379 | |
sentinel monitor mymaster 10.1.8.36 6379 1 | |
sentinel down-after-milliseconds mymaster 5000 |
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
Error: | |
2011/03/15 17:07:12 [crit] 7836#0: *7 connect() to unix:/tmp/phpfpm.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: wils.drupal7.com.br, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/phpfpm.sock:", host: "wils.drupal7.com.br" | |
--- | |
Cause: PHP-FPM misconfiguration. | |
--- | |
Solution: | |
1 - Check the php-fpm configuration: vi /etc/php-fpm.d/www.conf | |
2 - Comment the line ";listen = 127.0.0.1:9000" | |
3 - Add the line: listen = /tmp/phpfpm.sock | |
4 - Restart: /etc/init.d/php-fpm restart |
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
<unknown>:0: error: -[apiTests testExample] : failed: caught "NSInvalidArgumentException", "*** -[NSURL initFileURLWithPath:]: nil string parameter" | |
( | |
0 CoreFoundation 0x007321e4 __exceptionPreprocess + 180 | |
1 libobjc.A.dylib 0x004ac8e5 objc_exception_throw + 44 | |
2 CoreFoundation 0x00731fbb +[NSException raise:format:] + 139 | |
3 Foundation 0x000c592b -[NSURL(NSURL) initFileURLWithPath:] + 123 | |
4 Foundation 0x000c57fd +[NSURL(NSURL) fileURLWithPath:] + 67 | |
5 apiTests 0x04010023 -[DatabaseManager managedObjectModel] + 291 | |
6 apiTests 0x040102b7 -[DatabaseManager persistentStoreCoordinator] + 503 | |
7 apiTests 0x0400f538 -[DatabaseManager setupContexts] + 312 |
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
NSURL *apiURL = [NSURL URLWithString:@"http://api.stackoverflow.com/1.1/questions?tagged=objective-c&pagesize=30"]; | |
NSError *error = nil; | |
// First option - failed | |
NSInputStream *inputStream = [NSInputStream inputStreamWithURL:apiURL]; // returning nil | |
id jsonFound1 = [NSJSONSerialization JSONObjectWithStream:inputStream options:NSJSONReadingMutableContainers error:&error]; |
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)viewDidLoad | |
{ | |
NSError *error = nil; | |
// Prepare URL request to JSON call... | |
NSURLRequest *request = [NSURLRequest requestWithURL: | |
[NSURL URLWithString: | |
@"http://reviewapp/items.json"]]; | |
NSData *response = [NSURLConnection |
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
(function($) { | |
window.Insight = Backbone.Model.extend({ | |
view: function(index) { | |
//return this.get('innovations')[index]; | |
console.log(this.get('innovations')[index]); | |
} | |
}); | |
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
@app = window.app ? {} | |
class Insight extends Backbone.Model | |
@app.Insight = Insight | |
class Insights extends Backbone.Collection | |
model: app.Insight | |
url: 'http://localhost/items.json' | |
initialize: -> |
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
[ | |
{ | |
"Item":{ | |
"id":"1", | |
"title":"Lightbulb Gadget - Self Plugging.", | |
"sub_title":"This guy plugs himself in. So, which came first? The socket or the plug?", | |
"description":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero metus, suscipit vestibulum gravida vitae, ornare sit amet diam. Praesent et tincidunt metus. Etiam eu sapien turpis, id vehicula libero. In hendrerit congue leo sit amet mattis. Pr", | |
"rating_count":"3", | |
"created":"2011-10-19 10:49:07", | |
"modified":"2011-11-10 10:18:23" |
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
Uncaught Error: Parse error on line 5: | |
... <hr /> XXX {{Rating[0].notes}} | |
---------------------^ | |
Expecting 'ID' |
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
{ | |
"20131126080000": { | |
"page_views": 5, | |
"visits": 4, | |
"unique_visits": 2 | |
}, | |
"20131126080010": { | |
"page_views": 5, | |
"visits": 4, | |
"unique_visits": 2 |
OlderNewer