See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
if (new URLSearchParams(window.location.search).get('portal')) { | |
// <create start portal> | |
// Create portal group to contain all portal elements | |
const startPortalGroup = new THREE.Group(); | |
startPortalGroup.position.set(SPAWN_POINT_X, SPAWN_POINT_Y, SPAWN_POINT_Z); | |
startPortalGroup.rotation.x = 0.35; | |
startPortalGroup.rotation.y = 0; | |
// Create portal effect |
var _ = Underscore.load(); | |
/* | |
* Queries Yahoo finance API for historical prices for a given list of tickers | |
* | |
* @param {Array} tickers A list of tickers | |
* @param {Date} date Date to query for. Must be a date the markets were open | |
* @return A map of ticker to adjusted close prices | |
*/ |
@BotFather
/newbot
and hit SendDone! Congratulations on your new bot. You will find it at t.me/new_bot.
// Inspired by https://github.com/Iku/Google-Forms-to-Discord | |
const BOT_API = "YOUT_BOT_API"; | |
const CHAT_ID = "CHAT_ID"; | |
function onSubmit(e) { | |
var form = FormApp.getActiveForm(); | |
var allResponses = form.getResponses(); | |
var latestResponse = allResponses[allResponses.length - 1]; | |
var response = latestResponse.getItemResponses(); | |
var result = ""; |
This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:
*nix
based command prompt (but not the default Windows Command Prompt!)cd ~/.ssh
. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\
on Windows).ssh
folder, there should be these two files: id_rsa
and id_rsa.pub
. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls
to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa
and id_rsa.pub
in order for Git, GitHub, and BitBucket to recognize them by default.ssh-keygen -t rsa -C "[email protected]"
. Thimport React from "react"; | |
import { | |
Text, | |
View, | |
Item, | |
Icon, | |
Input, | |
Button | |
} from 'native-base'; | |
import { KeyboardAvoidingView } from "react-native"; |
getGreetingTime = (currentTime) => { | |
if (!currentTime || !currentTime.isValid()) { return 'Hello'; } | |
const splitAfternoon = 12; // 24hr time to split the afternoon | |
const splitEvening = 17; // 24hr time to split the evening | |
const currentHour = parseFloat(currentTime.format('HH')); | |
if (currentHour >= splitAfternoon && currentHour <= splitEvening) { | |
// Between 12 PM and 5PM | |
return 'Good afternoon'; |
#!/bin/bash | |
: ${MJ_APIKEY_PUBLIC:="YOUR PUBLIC APIKEY HERE"} | |
: ${MJ_APIKEY_PRIVATE:="YOUR PRIVATE APIKEY HERE"} | |
: ${TEMPLATE:="291077"} | |
: ${TO:='[email protected]'} | |
: ${TO_NAME:='Testers'} | |
: ${FROM:='[email protected]'} | |
: ${FROM_NAME:='Your name'} | |
: ${SUBJECT:="Email sent by script $0"} |
yarn add react-native-config
react-native link react-native-config
.env
files for each configuration. Ex: .env.dev
, .env.prod
, etc
Ex:API_ENDPOINT=https://api.myresource.com/dev
ENV=dev