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
| /// <reference path="./.sst/platform/config.d.ts" /> | |
| import { resolve as pathResolve } from "node:path"; | |
| import { writeFileSync as fsWriteFileSync } from "node:fs"; | |
| import { asset as pulumiAsset, all as pulumiAll } from "@pulumi/pulumi"; | |
| // Specify HCLOUD_TOKEN and CLOUDFLARE_API_TOKEN before running | |
| // Permissions for CLOUDFLARE_API_TOKEN: | |
| // - Account Settings:Read | |
| // - Zone Settings:Edit |
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
| // anwswer to http://stackoverflow.com/questions/41915285/polling-with-rxswift-and-parse-server | |
| func myObs() -> Observable<Int> { | |
| return Observable<Int>.create { observer in | |
| let sig = Observable<Int>.interval(1.0, scheduler: MainScheduler.instance) | |
| let subscription = | |
| sig.subscribe(onNext: { num in | |
| observer.onNext(num) | |
| if num == 10 { |
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
| - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
| { | |
| static NSString *CellIdentifier = @"Cell"; | |
| UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
| // Configure the cell... | |
| if (!cell) { | |
| cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault | |
| reuseIdentifier:CellIdentifier] autorelease]; | |
| } |
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
| import UIKit | |
| class ViewController: UIViewController { | |
| @IBOutlet weak var tableView: UITableView! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| // Do any additional setup after loading the view, typically from a nib. | |
| self.tableView.estimatedRowHeight = 44 |
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
| // References | |
| // https://github.com/damienpontifex/BlogCodeSamples/tree/master/SelfSizingTextViewTableCell | |
| // https://pontifex.azurewebsites.net/self-sizing-uitableviewcell-with-uitextview-in-ios-8/ | |
| // | |
| // In UITableViewController | |
| // tableView.rowHeight = UITableViewAutomaticDimension; | |
| // tableView.estimatedRowHeight = DefaultCellHeight; | |
| // | |
| import UIKit |
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
| ;; please install web-mode | |
| ;; in your .emacs.d/init.el | |
| (add-to-list 'auto-mode-alist '(".*/react/.*\\.js[x]?\\'" . web-mode)) | |
| (setq web-mode-content-types-alist | |
| '(("jsx" . "/.*/react/.*\\.js[x]?\\'"))) |
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
| . | |
| ├── actions | |
| ├── stores | |
| ├── views | |
| │ ├── Anonymous | |
| │ │ ├── __tests__ | |
| │ │ ├── views | |
| │ │ │ ├── Home | |
| │ │ │ │ ├── __tests__ | |
| │ │ │ │ └── Handler.js |
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
| { | |
| // http://eslint.org/docs/rules/ | |
| "ecmaFeatures": { | |
| "binaryLiterals": false, // enable binary literals | |
| "blockBindings": false, // enable let and const (aka block bindings) | |
| "defaultParams": false, // enable default function parameters | |
| "forOf": false, // enable for-of loops | |
| "generators": false, // enable generators | |
| "objectLiteralComputedProperties": false, // enable computed object literal property names |