Skip to content

Instantly share code, notes, and snippets.

View colinta's full-sized avatar
🏠
Working from home

Colin T.A. Gray colinta

🏠
Working from home
View GitHub Profile
diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index db9a34a..e95b882 100644
--- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -165,7 +165,7 @@ def use_react_native_codegen!(spec, options={})
return if ENV['DISABLE_CODEGEN'] == '1'
# The path to react-native (e.g. react_native_path)
- prefix = options[:path] ||= File.join(__dir__, "..")
+ prefix = options[:path] ||= "../../node_modules/react-native"
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
layout do
@table_holder = subview(UIView, :table) do
@table = subview(UITableView,
frame: [[50,300],[500, 400]],
dataSource: self,
delegate: self
)
end
end
Teacup::Stylesheet.new :main do
style :my_style,
constraints: [
constrain_left(0),
constrain_width(100),
constrain_top(0),
constrain(:bottom).equals(:superview, :bottom),
]
end
Teacup::Stylesheet.new :create_screen do
# Input Fields
style :input_text_wrapper,
left: 24,
backgroundColor: UIColor.colorWithPatternImage(UIImage.imageNamed('ui-textfield-normal.png')),
userInteractionEnabled: true,
width: 249
style :input_text_type,
@colinta
colinta / gist:4716202
Last active December 12, 2015 04:39 — forked from Ferdev/gist:4716131
class Symbol
def ivar
"@#{self}"
end
end
foo.instance_variable_set(:name.ivar, value)
class SubmitButton < UIButton
def self.make(params={})
# return instance of SubmitButton (or any subclass)
@submitButton = self.buttonWithType(UIButtonTypeRoundedRect)
@submitButton.frame = params[:frame]
# defaults
@submitButton.titleLabel.font = UIFont.systemFontOfSize(14)
@submitButton.titleLabel.text = "Submit"
@submitButton.titleLabel.backgroundColor = UIColor.grayColor
Teacup::Stylesheet.new(:iphone) do
# enable orientations on the root view
style do
left 0
top 0
width 320
height 480
backgroundColor :lightyellow.uicolor
portrait true
@colinta
colinta / gist:2864117
Created June 3, 2012 16:42 — forked from Cosmo/gist:2864098
css dsl for rubymotion
# Inline styles
@calculate_button = UIButton.named(I18n.t(:calculate_button)).style(color: 0xFFFFFF, align: :center, vertical_align: :center, top: 10, left: 30, width: 120, height: 40)
# External styles
# /app/stylesheets/application.rb
class ApplicationStylesheet < Stylesheets::Base
# Stylesheets for UI-Elements
# usage: @element.outfit(:awesome_default)
@colinta
colinta / bookstore.py
Created April 16, 2012 17:21 — forked from chroto/bookstore.py
SA Bookstore
"""
# Bookstore
- Book => Images
- Book <=> Author
- Book <=> Genre
- Book -> Genre (Primary)