I hereby claim:
- I am mcconkiee on github.
- I am mcconkie (https://keybase.io/mcconkie) on keybase.
- I have a public key whose fingerprint is 9B1A CB2C 61DF 3B54 7528 CDB8 F538 A7E1 EEB3 880D
To claim this, I am signing this object:
| # https://dev.to/theghostyced/setting-up-a-node-typescript-project-in-under-4-minutes-4gk2 | |
| npm init -y | |
| # ts config | |
| touch tsconfig.json | |
| echo '{ | |
| "compilerOptions": { | |
| "target": "es6", | |
| "module": "commonjs", | |
| "rootDir": "src", | |
| "outDir": "dist", |
| # REACT NATIVE | |
| ## recreate bundle js | |
| ``` | |
| react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ | |
| ``` | |
| ## Add host file | |
| ### EMULATOR | |
| ``` |
I hereby claim:
To claim this, I am signing this object:
| //assumes FontAwesome.ttf is a resource and added to plist | |
| NSInteger ti = (NSInteger)self.quizDuration ; | |
| NSInteger seconds = ti % 60; | |
| NSInteger minutes = (ti / 60) % 60; | |
| NSInteger hours = (ti / 3600); | |
| NSString *TTLE = [NSString stringWithFormat:@"%02li:%02li:%02li ", (long)hours, (long)minutes, (long)seconds]; | |
| //f01d = play | |
| //f04c = pause |
| <% #place this in header %> | |
| <% content_for :javascript_includes do %> | |
| <%= javascript_include_tag "forms.js" %> | |
| <% end %> |
| # Polymorphic Model | |
| class Attachment < ActiveRecord::Base | |
| belongs_to :attachable, :polymorphic => true | |
| mount_uploader :image, ImageUploader | |
| end | |
| # Has Many Model | |
| require 'carrierwave/orm/activerecord' | |
| class Exercise < ActiveRecord::Base | |
| has_many :images , :as=> :attachable, :dependent => :destroy ,:class_name => "Attachment" |
| #add to Gemfile | |
| gem 's3able', path: '/Users/ericmcconkie/Desktop/s3uploadengine/s3able' | |
| gem 'aws-sdk' | |
| #mount to routes | |
| mount S3able::Engine => '/images', :as => 's3image' #you can see all uploads at http://localhost:3000/images | |
| get 'products/:id/image'=>'s3able/s3images#new', :s3imageable=>"Product" #a place to upload an image and attach to your model | |
| #config | |
| rake s3able:s3config secret="{{AWS_SECRET}}" key="{{AWS_KEY}}" bucket="{{aws_bucket}}" |