Skip to content

Instantly share code, notes, and snippets.

View luisdelarosa's full-sized avatar

Louie de la Rosa luisdelarosa

View GitHub Profile
@implementation NSImage (RSShading)
- (NSImage *) tintedImage
{
NSImage* newImage = [[[NSImage alloc] initWithSize:[self size]] autorelease];
NSRect imageRect = {NSZeroPoint, [self size]};
NSColor *color = [NSColor blackColor];
[newImage lockFocus];
[[color colorWithAlphaComponent: 0.25] set];
package Reddit;
import java.util.LinkedList;
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@luisdelarosa
luisdelarosa / count_cocoapods_subspecs.sh
Created April 5, 2014 12:32
Count the subspecs for all CocoaPods. Execute this in a local clone of https://github.com/CocoaPods/Specs
grep -R subspec * | cut -d' ' -f1 | uniq -c | sort
pod 'RestKit', :podspec => 'local/path/to/RestKit.podspec'
if(mLiveCard == null){
//Publish your card
}else{
mLiveCard.unpublish();
//Set liveCard's view
mLiveCard.setNonSilent(true);
mLiveCard.publish();
}
<trigger keyword="@string/your_voice_trigger">
<constraints network="true" />
</trigger>
@luisdelarosa
luisdelarosa / 0_reuse_code.js
Created January 29, 2014 22:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console