Skip to content

Instantly share code, notes, and snippets.

Avatar

Felipe Cypriano fcy

View GitHub Profile
View jasper-xerces-grails.pom.xml
<!-- This is what you need to do to avoid conflict when using
JasperReport or xercesImpl in a mavenized Grails project -->
<dependency>
<groupId>jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jasperreports.version}</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
View build_intellij_sync.gradle
apply plugin: 'groovy'
sourceCompatibility = 1.5
version = '0.1-SNAPSHOT'
repositories {
mavenRepo(urls: 'http://repository.codehaus.org/')
mavenCentral()
}
@fcy
fcy / objectivec.def
Created Dec 2, 2010
Syntax highlight definition for Atlassian Fisheye and Crucible. Save the file in <FISHEYE_INST>/syntax and update <FISHEYE_INST>/syntax/filemap to objective-c file extensions.
View objectivec.def
# Objective-C Syntax Highliht for Atlassian Fisheye and Crucible
# Based on Atlassian's C syntax highlight
# Author: Felipe Cypriano <fmcypriano@gmail.com>
# Copyright 2010 Felipe Cypriano
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
View refactory.rb
# encoding: utf-8
class OperationsController < ApplicationController
respond_to :json
rescue_from ActiveRecord::RecordNotFound, :with => :not_found
def show
operation = Operation.find(params[:id])
respond_with operation
end
@fcy
fcy / fix-git-svn.sh
Created Jul 23, 2012
Fix git-svn on Mountain Lion
View fix-git-svn.sh
#! /bin/bash
# Fix git-svn on Mountain Lion
# Author: Felipe Cypriano <felipe@cypriano.me≥
# Based on Vitor Quinn blog post:
# http://victorquinn.com/blog/2012/02/19/fix-git-svn-in-mountain-lion/
# If you do not have xcode-select pointing to the right Xcode installation
# put the right path in the line bellow and uncoment it
#sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
View gist:5051802
@implementation DatabaseConnection
static DatabaseConnection *connection;
+ (DatabaseConnection *)connection;
{
return connection;
}
+ (void)setConnection:(DatabaseConnection *)newConnection;
View gist:5189583
# AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIViewController *rootController = [[UIStoryBoard storyboardWithName:@"MainStoryBoard" bundle:nil] instantiateInitialViewController];
PPRevealSideViewController *revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:rootController];
self.window.rootViewController = _revealSideViewController;
[window makeKeyAndVisible];
return YES;
@fcy
fcy / alfred_urban_dictionary.py
Created Mar 25, 2013
My first Python script. It integrates Urban Dictionary with the new Alfred 2 Workflow. Download the bundle here: https://www.dropbox.com/s/edrab4lyzi5gorj/Urban%20Dictionary.alfredworkflow
View alfred_urban_dictionary.py
import urllib2
from HTMLParser import HTMLParser
import xml.etree.ElementTree as ET
class UrbanDictionaryHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.is_parsing_entries = False
self.definitions = []
self.is_word_open = False
@fcy
fcy / gist:92f7cd21de37129b6d3d
Created Sep 5, 2014
Hide Pods from GitHub's PR Diffs
View gist:92f7cd21de37129b6d3d
$('#files_bucket .file').each(function() {
var fileDiff = $(this).children('.data, .image')
var fileNameSpan = $(this).find('.info > .js-selectable-text').first()
var fileName = fileNameSpan.attr('title')
var filter = /Pods/
if (filter.test(fileName)) {
fileDiff.hide()
}
});
@fcy
fcy / CrashlyticsAdapter.h
Created Jun 24, 2016
Thumbtack's Crashlytics Adapter
View CrashlyticsAdapter.h
#import <Foundation/Foundation.h>
/* How To Enable CrashlyticsAdapter
*
* # On the App Target
*
* Initialize Crashlytics as usual and pass the real Crashlytics instance to the adapter:
*
* [Fabric with:@[[Crashlytics class]]];
* [CrashlyticsAdapter with:[Crashlytics sharedInstance]];