For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
import * as mongoose from 'mongoose'; | |
export let Schema = mongoose.Schema; | |
export let ObjectId = mongoose.Schema.Types.ObjectId; | |
export let Mixed = mongoose.Schema.Types.Mixed; | |
export interface IHeroModel extends mongoose.Document { | |
name: string; | |
power: string; |
docker exec -i CONTAINER_ID /bin/bash -c "export TERM=xterm && mysql -proot -uroot database" < import.sql |
import React, { | |
AppRegistry, Component, StyleSheet, | |
Text, View, TouchableOpacity, TextInput | |
} from 'react-native' | |
import { createStore, combineReducers, bindActionCreators } from 'redux' | |
import { connect, Provider } from 'react-redux' | |
import { reducer as form, reduxForm } from 'redux-form' | |
const Button = ({ children, onPress }) => <TouchableOpacity onPress={onPress}> | |
<Text>{children}</Text> |
First we'll update your local master
branch. Go to your local project and check out the branch you want to merge into (your local master
branch)
$ git checkout master
Fetch the remote, bringing the branches and their commits from the remote repository.
You can use the -p
, --prune
option to delete any remote-tracking references that no longer exist in the remote. Commits to master
will be stored in a local branch, remotes/origin/master
.
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
I don't like IDEs. I want to code in my editor and use the command line for everything else. I like the flow better and it feels faster to me.
I also like to have one command to do several things I want to do.
I don't want to open Xcode to create an archive, then open the archive window, then upload the archive to iTunes. It's slow and breaks my flow.
Also, in react native, it's trivial to build Android releases on the command line. I want to create and upload both iOS and android from the command line.
So after hours of searching the internet I found a flow I like for creating and uploading archives for iOS all from the command line
#!/bin/sh | |
if [ "$1" = "" ]; then | |
echo "Usage: kshell <pod>" | |
exit 1 | |
fi | |
echo Getting pods... | |
PODS=$(kubectl get pods --no-headers --output=name | grep $1) | |
PODS=(${PODS}) | |
NUM_PODS=${#PODS[@]} |
#!/usr/bin/ruby | |
require 'xcodeproj' | |
# ============================================ | |
# !!! I've released a ruby gem that does the same thing, but better. | |
# You can install it by running `gem install xcprovisioner` or | |
# `sudo gem install xcprovisioner` if it asks for sudo rights. | |
# | |
# For more info: https://github.com/thelvis4/XCProvisioner |
(function () { | |
'use strict'; | |
/** | |
* wraps a promise in a timeout, allowing the promise to reject if not resolve with a specific period of time | |
* @param {integer} ms - milliseconds to wait before rejecting promise if not resolved | |
* @param {Promise} promise to monitor | |
* @example | |
* promiseTimeout(1000, fetch('https://courseof.life/johndoherty.json')) |