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
| Pod::Spec.new do |s| | |
| s.name = 'NYXImagesKit' | |
| s.version = '2.2' | |
| s.platform = :ios | |
| s.license = 'Simplified BSD license' | |
| s.summary = 'A set of efficient categories for UIImage class. It allows filtering, resizing, masking, rotating, enhancing... and more.' | |
| s.homepage = 'https://github.com/Nyx0uf/NYXImagesKit' | |
| s.author = 'Benjamin Godard' | |
| s.source = { :git => 'https://github.com/Nyx0uf/NYXImagesKit.git', :ref => '3daa60e66dabb5f513435675dbabe8c34ae6e6da' } | |
| s.source_files = 'Categories', 'Classes', 'Helper' |
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
| require 'pathname' | |
| resize_command = 'sips -z 34 34 --out out/%2$s %1$s' | |
| copy_command = 'cp %s out/%s' | |
| Pathname.glob('./in/*').sort.each_with_index do |path| | |
| next unless path.to_s.match(/png$/) | |
| basename = path.basename('.png').to_s | |
| system(copy_command % [path.to_s, basename+'@2x.png']) | |
| system(resize_command % [path.to_s, basename+'.png']) |
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
| export EDITOR=/usr/bin/vim | |
| export CLICOLOR=1 | |
| export LSCOLORS=DxGxcxdxCxegedabagacad | |
| export HISTSIZE=5000 | |
| export HISTFILESIZE=5000 | |
| export HISTCONTROL=ignoreboth | |
| # alieases | |
| alias r='rails' | |
| alias g='git' |
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
| class LoadableImageView < UIImageView | |
| attr_accessor :loading, :loading_view | |
| def initWithFrame(rect) | |
| super | |
| @loading = false | |
| @loading_view = UIActivityIndicatorView.alloc.initWithActivityIndicatorStyle(UIActivityIndicatorViewStyleWhite).tap do |lv| | |
| lv.color = UIColor.blackColor | |
| end | |
| self |
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
| Motion::Project::App.setup do |app| | |
| # (snip) | |
| app.pods do | |
| pod 'SocketRocket', :podspec => 'SocketRocket' | |
| pod 'socket.IO', :podspec => 'socket.IO.podspec' | |
| end | |
| end |
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
| class TaskView < UIView | |
| attr_accessor :task, :title, :done, :memo | |
| def initWithFrame(rect) | |
| super.tap do |v| | |
| @title = subview(UILabel, | |
| text: 'タスク', | |
| font: UIFont.fontWithName('HiraKakuProN-W6', size:128), | |
| backgroundColor: UIColor.clearColor, | |
| textColor: UIColor.whiteColor, |
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
| config.logger = ActiveSupport::TaggedLogging.new(Logger.new(config.paths['log'].first)) | |
| config.logger.formatter = lambda {|severity, datetime, progname, msg| | |
| "%s, [%s #%d], %5s -- %s\n" % [severity[0..0], datetime.strftime('%Y-%m-%d %H:%M:%S')+('.%06d' % datetime.usec), $$, severity, msg] | |
| } | |
| config.logger.level = Logger::DEBUG |
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
| module MigrateOneToTwo | |
| module_function | |
| def store_path | |
| File.join(App.documents_path, 'store.sqlite') | |
| end | |
| def tmp_store_path | |
| File.join(App.documents_path, 'store_tmp.sqlite') | |
| end |
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
| class MyViewController < UIViewController | |
| def viewDidLoad | |
| super | |
| view.backgroundColor = UIColor.whiteColor | |
| end | |
| def viewDidAppear(animated) | |
| super | |
| if TWTweetComposeViewController.canSendTweet | |
| tw = TWTweetComposeViewController.new.tap do |c| |
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
| set mailserver smtp.gmail.com port 587 | |
| username "user@example.com" password "password" | |
| using tlsv1 | |
| with timeout 30 seconds |