Moved to repository: https://github.com/Mailcloud/swift-serializer
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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
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
var destFolder = null; | |
destFolder = Folder.selectDialog( 'Select the folder where you want to save the exported files.', app.activeDocument.path ); | |
var baseDestName = app.activeDocument.name; | |
if (baseDestName.indexOf('.') < 0) | |
{ | |
//nothing | |
} else { |
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
require 'socket' | |
require 'openssl' | |
require 'net/ftp' | |
class Net::FTPS < Net::FTP | |
end | |
class Net::FTPS::Implicit < Net::FTP | |
FTP_PORT = 990 |
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
// | |
// NSObject+Blocks.h | |
// Filemator | |
// | |
// Created by Zachary Waldowski on 4/12/11. | |
// Copyright 2011 Dizzy Technology. All rights reserved. | |
// | |
@interface NSObject (Blocks) |
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
# app/models/ability.rb | |
# All front end users are authorized using this class | |
class Ability | |
include CanCan::Ability | |
def initialize(user) | |
user ||= User.new | |
can :read, :all |
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 BootstrapFormBuilder < ActionView::Helpers::FormBuilder | |
delegate :capture, :content_tag, :tag, to: :@template | |
%w[text_field text_area password_field collection_select].each do |method_name| | |
define_method(method_name) do |name, *args| | |
errors = object.errors[name].any?? " error" : "" | |
error_msg = object.errors[name].any?? content_tag(:span, object.errors[name].join(","), class: "help-inline") : "" | |
content_tag :div, class: "clearfix#{errors}" do |
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
# db/migrations/20120118012543_create_site_configuration.rb | |
class CreateSiteConfigurations < ActiveRecord::Migration | |
def change | |
create_table :site_configurations do |t| | |
t.string :key | |
t.text :value | |
t.string :form_type | |
t.string :form_collection_command |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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
// | |
// API.swift | |
// | |
// Created by Taro Minowa on 6/10/14. | |
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved. | |
// | |
import Foundation | |
typealias JSONDictionary = Dictionary<String, AnyObject> |
OlderNewer