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
- (UIImage*)blendedImage { | |
GPUImagePicture* bluredImage = [[GPUImagePicture alloc] initWithImage:self.filterImage]; | |
GPUImageFilterGroup* blurFilterGroup = [[GPUImageFilterGroup alloc] init]; | |
GPUImageFilter* colorOverlayfilter = [[GPUImageFilter alloc] initWithFragmentShaderFromFile:@"WhiteColorOverlay"]; | |
GPUImageGaussianBlurFilter* gaussainBlur = [[GPUImageGaussianBlurFilter alloc] init]; | |
[gaussainBlur setBlurSize:3.0f]; | |
[blurFilterGroup addFilter:colorOverlayfilter]; | |
[blurFilterGroup addFilter:gaussainBlur]; |
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
#import <Foundation/Foundation.h> | |
#import "NSManagedObject+DataManager.h" | |
@interface DataManager : NSObject | |
@property (nonatomic, strong, readonly) NSManagedObjectModel* managedObjectModel; | |
@property (nonatomic, strong, readonly) NSManagedObjectContext* managedObjectContext; | |
@property (nonatomic, strong, readonly) NSPersistentStoreCoordinator* persistentStoreCoordinator; | |
@property (nonatomic, strong) NSURL* modelURL; | |
@property (nonatomic, strong) NSString* persistantStoreName; |
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
package lib | |
import org.scalatra._ | |
import org.scalatra.util.RicherString._ | |
import javax.servlet.http.{HttpServletResponse, HttpServletRequest} | |
import org.scalatra.auth.{ScentrySupport, ScentryStrategy} | |
import net.iharder.Base64 | |
import java.util.Locale | |
import io.Codec |
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
1 "============================================================================ | |
2 "File: scala.vim | |
3 "Description: Syntax checking plugin for syntastic.vim | |
4 "Maintainer: Rickey Visinski <rickeyvisinski at gmail dot com> | |
5 "License: This program is free software. It comes without any warranty, | |
6 " to the extent permitted by applicable law. You can redistribute | |
7 " it and/or modify it under the terms of the Do What The Fuck You | |
8 " Want To Public License, Version 2, as published by Sam Hocevar. | |
9 " See http://sam.zoy.org/wtfpl/COPYING for more details. | |
10 " |
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
#!/bin/zsh | |
source "$HOME/.rvm/scripts/rvm" | |
lolcommits --capture |
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
#include <EEPROM.h> | |
#include <Arduino.h> | |
#include "log.h" | |
template <class T> class EEPROMObject { | |
public: | |
EEPROMObject(uint16_t _offset, uint8_t _maxObjects) : offset(_offset), maxObjects(_maxObjects){}; | |
uint16_t create(uint8_t& index, const T& value); | |
uint16_t update(uint8_t index, const T& value); | |
uint16_t read(uint8_t index, T& value); |
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
[serviceProfile createCharacteristicWithUUID:<#UUID#> | |
name:<#name#> | |
andProfile:^(BlueCapCharacteristicProfile* characteristicProfile) { | |
characteristicProfile.properties = CBCharacteristicPropertyRead | CBCharacteristicPropertyWrite; | |
[characteristicProfile serializeObject:^NSData*(id data) { | |
return nil; | |
}]; | |
[characteristicProfile afterDiscovered:^(BlueCapCharacteristic* chararacteristic) { | |
}]; | |
[characteristicProfile deserializeData:^NSDictionary*(NSData* data) { |
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
protocol Thing { | |
typealias argType | |
func doit(val:argType) -> argType | |
} | |
class IntThing : Thing { | |
func doit(val: Int) -> Int { | |
return val + 1 | |
} | |
} |
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
(ns climbing | |
(:require [clojure.string :as string]) | |
) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; part a ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Each mountain block has 2 children it follows that for a mountain of size n | |
; the total paths will equal total number of block sequences from top to base | |
; taking one from each row which is given by p=2^(n-1) | |
(defn simple-path-count |
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
import UIKit | |
class Notify { | |
class func resetEventCount() { | |
eventCount = 0; | |
UIApplication.sharedApplication().applicationIconBadgeNumber = 0 | |
} | |
class func withMessage(message:String) { |