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
on list2string(theList, theDelimiter) | |
-- First, we store in a variable the current delimiter to restore it later | |
set theBackup to AppleScript's text item delimiters | |
-- Set the new delimiter | |
set AppleScript's text item delimiters to theDelimiter | |
-- Perform the conversion | |
set theString to theList as string |
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
@registerTask 'generateRandomLengthFile', () -> | |
# Generate random length file | |
var myRandomLengthString = 'todo' | |
# Write the file | |
scssfile = grunt.file.write("my-includes-folder/includes.html", myRandomLengthString) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Localize.py - Incremental localization on XCode projects | |
# João Moreno 2009 | |
# http://joaomoreno.com/ | |
# Modified by Steve Streeting 2010 http://www.stevestreeting.com | |
# Changes | |
# - Use .strings files encoded as UTF-8 |
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
#import "UITextField+RACKeyboardSupport.h" | |
#import <ReactiveCocoa/RACEXTScope.h> | |
#import <ReactiveCocoa/NSObject+RACDescription.h> | |
@implementation UITextField (RACKeyboardSupport) | |
- (RACSignal *)rac_keyboardReturnSignal { | |
@weakify(self); | |
return [[[[RACSignal | |
defer:^{ |
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
// | |
// CommonMacros.h | |
// Created by Tom Adriaenssen (@inferis) | |
// Inspired by the awesome work by Piet Jaspers (@pjaspers) | |
// | |
/* | |
* How to use this file: | |
* 1. Find your .pch file | |
* 2. Import this file |
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
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
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
# Mixin to (i.e. include in) any worker class that does FB API calls and should be throttled. | |
module FacebookThrottle | |
def perform_throttled(*args, &block) | |
options = args.extract_options! | |
user = User.find_by_fb_uid(options[:fb_uid]) | |
if user | |
if !user.valid_facebook_token? # A bitwise flag managed by flag_shih_tzu gem | |
puts "Skipping #{self.class} #{user.fb_uid}: Invalid Oauth Token for #{user}" | |
return false |
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
// | |
// Created by Alex Hajdu on 5/27/13. | |
// Copyright (c) 2013 Mr.Fox and friends. All rights reserved. | |
// | |
// To change the template use AppCode | Preferences | File Templates. | |
// | |
#import <Foundation/Foundation.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
# READ MORE HERE: http://www.webdevotion.be/blog/2012/06/06/terminal-git-branch-status-colored-icons | |
# ============================================================================== | |
# FANCY GIT STATUS ICONS | |
# ============================================================================== | |
# SOME VARIABLES in capitals | |
# no whitespace between variable names and = sign! | |
COLOR_RESET="\e[00m" | |
COLOR_GREEN="\e[1;32m" | |
COLOR_RED="\e[00;31m" |
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
class ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
NewerOlder