- Create a project in XCode with the default settings
- iOS > Application > Single View Application
- Language: Swift
- Under project General settings, add ReactKit to Linked Framework and Libraries
- + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
- Now ReactKit would have been imported. Link it by choosing it from the list.
- + > lib.ReactKit.a
- Under project Build Settings,
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
<?php | |
class Deploy { | |
// | |
// EDIT ME | |
// This will be sent as the User Agent to the Meta API. Set this as | |
// your GITHUB_USERNAME or APPLICATION_NAME | |
// Documentation: https://developer.github.com/v3/#user-agent-required | |
// |
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
const resolvers = { | |
Query: { | |
async product(_, { id }, __, info) { | |
const fields = getFields(info); | |
const backendFields = getBackendFields(fields, dependencyMap); | |
const backendResponse = await fetch(`/product?id=${id}&fields=${backendFields}`); | |
const schemaResponse = getSchemaResponse(backendResponse, fields, transformerMap); | |
return schemaResponse; | |
} | |
} |
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
const productLoader = new DataLoader(getBackendProducts); | |
const resolvers = { | |
Query: { | |
async product(_, { id }, __, info) { | |
const fields = getFields(info); | |
const backendFields = getBackendFields(fields, dependencyMap); | |
const backendResponse = await productLoader.load({ id, fields: backendFields }); | |
const schemaResponse = getSchemaResponse(backendResponse, fields, transformerMap); | |
return schemaResponse; |
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
# Usage: | |
# user = ActiveDirectoryUser.authenticate('boopathi','password') | |
# user.first_name # => "Boopathi" | |
# user.flanderized_first_name # => "Boopathi Rajaa" | |
# user.groups # => ["Mac Users", "Geeks", "Ruby Coders", ... ] | |
require 'net/ldap' # gem install ruby-net-ldap | |
class ActiveDirectoryUser | |
### BEGIN CONFIGURATION ### |
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
Case I: node parent | |
Parent: true From tty: true | |
Parent: true From tty: true | |
TTY: true From tty: true | |
TTY: true From tty: true | |
Case II: node parent > asdf | |
Parent: true From tty: true | |
Parent: undefined From tty: true | |
TTY: true From tty: true |
Motivation -
- use
private
keyword - Use class private and not instance private.
- Statically analysable.
Based on this issue - tc39/proposal-private-fields#14, there is a lot of interest in using the private
keyword and no sigils, and sigils cannot be avoided for multiple reasons specified in the FAQ.
Addressing some of the comments by littledan,
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
#!/bin/bash | |
git branch -r | | |
awk '{print $1}' | | |
egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | | |
awk '{print $1}' |
class A {
#x;
constructor(x, a) {
#x = x;
this.foo = this.foo.bind(a);
}
foo() {
console.log(this?.#x); // optional chaining
// Possible to use optional chaining?
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
var ConcatSource = require('webpack/lib/ConcatSource'); | |
var loaderUtils = require('loader-utils'); | |
module.exports = CombineChunksPlugin; | |
// opts.filename = 'vendor.[contenthash].js' | |
function CombineChunksPlugin(opts) { | |
if (opts) { | |
this.filename = opts.filename ? opts.filename : 'vendor.bundle.js'; |
NewerOlder