How to add Live Template in Webstorm
- open preferences
- editor> live templates
- add template group for React Native
- add templates below to the new group
- define context > javascript
- edit variables > add "fileNameWithoutExtension" to "$fnName$"
[user] | |
name = Julien Bisconti | |
email = ****** | |
[core] | |
excludesfile = ~/.gitignore | |
pager = diff-so-fancy | less --tabs=1,5 -R | |
editor = /usr/bin/vim | |
[alias] | |
wow = log --all --graph --decorate --oneline --simplify-by-decoration |
// List all fonts on iPhone | |
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
for (NSString *family in familyNames) { | |
NSLog(@"Family name: %@", family); | |
fontNames = [UIFont fontNamesForFamilyName: family]; | |
for (NSString *font in fontNames) { | |
NSLog(@" Font name: %@", font); | |
} |
const bip39 = require("bip39"); | |
const bip32 = require("ripple-bip32"); | |
const ripple = require('ripple-keypairs') | |
var mnemonic = 'novel matter final only nice cheese address cradle civil crash great flame struggle consider crowd surface purpose saddle mango endless mixed trial tape wrap' | |
// Or generate: | |
// mnemonic = bip39.generateMnemonic() | |
console.log('mnemonic: ' + mnemonic) | |
const seed = bip39.mnemonicToSeed(mnemonic) // add second argument for 25th word encrypted |
// Since AsyncLocalStorage API is not exposed to native code, we have to grab the data ourselves. | |
// If you have been able to get Cocoapods use_frameworks! to work, you can `import React` | |
// Else make sure to include the following in your brindging header: | |
// #import <React/RCTAsyncLocalStorage.h> | |
import Foundation | |
class CacheManager { | |
let storageLocation = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent("RCTAsyncLocalStorage_V1") |
This script will update Info.plist of a target in XCode with the following
CFBundleVersion
to the git commit countGitDate
to the date of the last commitGitBranch
to the current branch nameGitTag
to the latest tag on current branchCreates a .version file to track last update and appease XCode needing a non-mutable output path.
// | |
// System Colors Playground | |
// fivestars.blog | |
// | |
// Created by Federico Zanetello on 9/6/19. | |
// | |
import UIKit | |
import PlaygroundSupport |
Since the recent release of Catalina, macOS has shipped with the ability to allow iOS/iPAD apps to run on macOS without any modification via a featureset known as Project Catalyst.
This is exciting, as writing React Native + Clojurescript apps as a target for the desktop is much more compelling than a pure Electron app (imo).