This is allowed for ReactNative apps. Source
AppHub.io is one option, open source coming soon.
#!/bin/sh | |
# enable-charles-proxy.sh | |
# | |
# Created by John Boiles on 9/21/15. | |
# | |
# This script sets :NSAppTransportSecurity:NSAllowsArbitraryLoads to true in the Info.plist file if building the Debug configuration. | |
# This enables debugging from https proxies such as Charles. | |
INFO_PLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
runtime: nodejs | |
api_version: 1 | |
vm: true | |
env_variables: | |
PORT: 8080 | |
MEMCACHE_URL: memcache:11211 |
NOTE (2022-07-09): Xcode finally added this functionality in Xcode 14, please see release notes here:
New Features in Xcode 14 Beta 3
When editing code, the Edit > Duplicate menu item and its corresponding keyboard shortcut now duplicate the selected text — or the line that currently contains the insertion point, if no text is selected. (8614499) (FB5618491)
// using ES6 Proxy to let Promises/Observables pretend like they're regular values. | |
// get the mapping function used for async objects | |
let getMapper = (target) => target instanceof Promise ? 'then' : | |
target instanceof Observable ? 'switchMap' : null; | |
// ^ fails if the Observable is in a local namespace e.g. Rx.Observable | |
// bind a value to its object if it's a function | |
let bindFn = (val, obj) => typeof val == 'function' ? val.bind(obj) : val; |
const spawn = require('child_process').spawn; | |
const command = 'node'; | |
const parameters = [path.resolve('program.js')]; | |
const child = spawn(command, parameters, { | |
stdio: [ 'pipe', 'pipe', 'pipe', 'ipc' ] | |
}); |
const ipc = require('node-ipc'); | |
ipc.config.id = 'a-unique-process-name1'; | |
ipc.config.retry = 1500; | |
ipc.config.silent = true; | |
ipc.serve(() => ipc.server.on('a-unique-message-name', message => { | |
console.log(message); | |
})); | |
ipc.server.start(); |
const cluster = require('cluster'); | |
const http = require('http'); | |
const numCPUs = require('os').cpus().length; | |
if (cluster.isMaster) { | |
// Fork workers. | |
for (var i = 0; i < numCPUs; i++) { | |
cluster.fork(); | |
} |
var sourceMap = require('source-map'); | |
var convert = require('convert-source-map'); | |
var fs = require('fs'); | |
var source = 'PATH_TO_APP/Myapp.app/main.jsbundle'; | |
var content = fs.readFileSync(source, 'utf8'); | |
var json = convert.fromComment(content).toJSON(); | |
var smc = new sourceMap.SourceMapConsumer(json); | |
var position = smc.originalPositionFor({ |