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
namespace :tasks do | |
namespace :create do | |
desc "Create all survey templates" | |
task :all => [:task1, :task2, :task3] | |
desc "desc1" | |
task :task1 => :environment do | |
end |
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
# collect values from a particular field | |
@users.collect(&:email) | |
# collect values from a particular method | |
@users.collect(&method(:user_preferences_url)) |
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
at_prefixed_chunks = text.split(/(?<=\s)@/).reject(&:blank?) |
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
/* | |
* Atom Stylesheet | |
* | |
* .generate-indents(): makes pretty indent guides. | |
* Enable 'Settings' -> 'Show Indent Guide' and taste the rainbow! | |
* | |
*/ | |
// Default and base colors for indent guides | |
@indentColor: hsla(345, 100%, 55%, .3); // Manipulate this to make pretty |
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
package th.co.fingertip.eventproFP.ui; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import th.co.fingertip.eventproFP.EventproFPEnum; | |
import android.app.Activity; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; |
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
(°з°) what ya want, pon? $> git log --author="Warut" | |
commit 6ae61a2229cd1dcd0429f5ce5fc28b8a03ae828b | |
Author: Warut Surapat <s.warut@gmail.com> | |
Date: Tue Nov 26 23:47:46 2013 +0700 | |
Update other spec stuffs. | |
commit ec9af001e7bdbbe453ff190bc16ac20c2ed373d2 |
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
// | |
// SignInViewControllerSpecs.m | |
// Taskworld | |
// | |
// Created by Warut Surapat on 11/8/13. | |
// Copyright 2013 Taskworld. All rights reserved. | |
// | |
#import "Kiwi.h" | |
#import "KIFUITestActor+TWTester.h" |
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
#!/bin/sh | |
# Launch application using ios-sim and set up environment to inject test bundle into application | |
# Source: http://stackoverflow.com/a/12682617/504494 | |
if [ "$RUN_APPLICATION_TESTS_WITH_IOS_SIM" = "YES" ]; then | |
test_bundle_path="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION" | |
environment_args="--setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection --setenv XCInjectBundle=$test_bundle_path --setenv XCInjectBundleInto=$TEST_HOST" | |
ios-sim launch $(dirname $TEST_HOST) $environment_args --args -SenTest All $test_bundle_path | |
echo "Finished running tests with ios-sim" |
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)drawRect:(CGRect)rect { | |
[[UIImage imageNamed:@"top_bg_pattern.png"] drawAsPatternInRect:rect]; | |
[self drawShadowsWithHeight:10 opacity:0.3 InRect:rect forContext:UIGraphicsGetCurrentContext()]; | |
} | |
- (void)drawShadowsWithHeight:(CGFloat)shadowHeight opacity:(CGFloat)opacity InRect:(CGRect)rect forContext:(CGContextRef)context { | |
CGColorSpaceRef space = CGBitmapContextGetColorSpace(context); | |
CGFloat topComponents[8] = {0, 0, 0, opacity, 0, 0, 0, 0}; |
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
#include <Wire.h> | |
void setup() { | |
Wire.begin(); | |
Serial.begin(9600); | |
} | |
int reading = 0; | |
NewerOlder