Skip to content

Instantly share code, notes, and snippets.

@vtsatskin
vtsatskin / gist:d78d0f58f3cf440dc6c207b992f51e4f
Created June 13, 2017 21:12
Add loopback to Network pane in System Preferences on macOS
sudo networksetup -createnetworkservice Loopback lo0
sudo networksetup -setmanual Loopback 172.20.42.42 255.255.255.255
➜ App git:(story-book) ✗ yarn --version (⌐•_•)
0.27.5
➜ App git:(story-book) ✗ node --version (⌐•_•)
v8.0.0
➜ App git:(story-book) ✗ react-native --version (⌐•_•)
react-native-cli: 2.0.1
react-native: 0.44.2
@vtsatskin
vtsatskin / gist:dd2e3ca81125b6f3e061176744bd2f7f
Created August 22, 2017 18:35
Running Android emulator through the command line on OSX
# Add this to your shell profile
export ANDROID_HOME=$HOME/Library/Android/sdk/
alias emulator='cd $ANDROID_HOME/tools/; ./emulator'
# In a new shell
emulator @<avd_name>
@vtsatskin
vtsatskin / typescriptreact.json
Last active February 27, 2019 17:43
VS Code snippet for creating a React PureComponent in TypeScript
{
/*
// Place your snippets for TypeScript React here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [