Skip to content

Instantly share code, notes, and snippets.

Warning: in_array() expects parameter 2 to be array, null given in DateObject->limitGranularity() (line 521 of /vagrant/web/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: in_array() expects parameter 2 to be array, null given in DateObject->limitGranularity() (line 521 of /vagrant/web/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: in_array() expects parameter 2 to be array, null given in DateObject->limitGranularity() (line 521 of /vagrant/web/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: in_array() expects parameter 2 to be array, null given in DateObject->limitGranularity() (line 521 of /vagrant/web/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: in_array() expects parameter 2 to be array, null given in DateObject->limitGranularity() (line 521 of /vagrant/web/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: in_array() expects parameter 2 to be array, null given in DateObject->limitGranularity() (line 521 of /va

Keybase proof

I hereby claim:

  • I am jchatard on github.
  • I am jchatard (https://keybase.io/jchatard) on keybase.
  • I have a public key whose fingerprint is 0264 6503 6E7F 0BCB 1C21 4720 D6EA CDC0 9BE0 E484

To claim this, I am signing this object:

{
"settings": {
"number_of_shards": 5,
"analysis": {
"filter": {
"elision": {
"type": "elision",
"articles": [
"l",
"m",
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
@jchatard
jchatard / gist:375738
Created April 22, 2010 20:00 — forked from coneybeare/gist:220250
UINavigationController background
// #Lighter r,g,b,a #Darker r,g,b,a
#define MAIN_COLOR_COMPONENTS { 0.153, 0.306, 0.553, 1.0, 0.122, 0.247, 0.482, 1.0 }
#define LIGHT_COLOR_COMPONENTS { 0.478, 0.573, 0.725, 1.0, 0.216, 0.357, 0.584, 1.0 }
@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect {
if (imageReady) {
UIImage *img = [UIImage imageNamed: @"navigation_background.png"];
[img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
@jchatard
jchatard / CoreDataVerboseErrors.m
Created September 29, 2010 08:20
Debug CoreData context save errors
NSError* error;
if(![context save:&error]) {
NSLog(@"Failed to save to data store: %@", [error localizedDescription]);
NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey];
if(detailedErrors != nil && [detailedErrors count] > 0) {
for(NSError* detailedError in detailedErrors) {
NSLog(@" DetailedError: %@", [detailedError userInfo]);
}
}
else {
@jchatard
jchatard / doxygen.rb
Created October 1, 2010 20:42
Modified version of Fred McCann doxygen User script to add Doxygen comments in Objective-C
#! /usr/bin/ruby
#
# This script helps us make doxygen comments in obj-c files in Xcode
#
# Created by Fred McCann on 03/16/2010.
# http://www.duckrowing.com
#
module Duckrowing
Process: My Memory [773]
Path: /Applications/My Memory.app/Contents/MacOS/My Memory
Identifier: fr.breek.My-Memory
Version: 1.0 (1)
Code Type: X86 (Native)
Parent Process: launchd [89]
Date/Time: 2011-01-05 14:50:29.751 +0100
OS Version: Mac OS X 10.6.5 (10H574)
Report Version: 6
@jchatard
jchatard / nsnumber_formatting.m
Created February 14, 2011 09:13
Formatting numbers
NSLocale *local = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
formatter = [[NSNumberFormatter alloc] init];
[formatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[formatter setLocale:local];
[local release];
[formatter setNumberStyle:NSNumberFormatterDecimalStyle];
[formatter setAlwaysShowsDecimalSeparator:YES];
@jchatard
jchatard / gist:2701212
Created May 15, 2012 12:02
Flush DNS cache under Mac OS X
dscacheutil -flushcache