Skip to content

Instantly share code, notes, and snippets.

Remove all the .ignore files in package modules.

Also remove cached files ie:

[from root]
git rm -r --cached packages/web/.env.development
git rm -r --cached packages/web/.env.production
...etc...

in addition to below...

// TODO still having issues getting env vars with spaces to work on dokku instance // I think the best course of action is to remove all spaces for now (replacing with // dashes was a close second choice, but easy enough to implement with the following file

create /server/src/utils/reduceEnvVars.ts

// current default setting is remove spaces
export const reduceEnvVars = (fileText: string, replaceSpace: string = '') => {
node -e "require('crypto').randomBytes(48, function(ex, buf) { console.log(buf.toString('hex')) });"
This is what I found to reflash on OSX...
(...assuming you have python installed...)
install the esptool
$ pip install esptool
determine the port where your device is connected. For me this was:
/dev/cu.SLAB_USBtoUART
To help find:
$ ls -la /dev/*USB*

Logging In

Motivation
An email address will be the singularity that the Accounts table will be founded upon. An account is the starting point for any identity. An account may be entered into from multiple login providers (username/pass, facebook, google, github, etc). An account will act as the entry point for a grouping of customers/users/characters. After logging in, a user will be given the option to select a user-entity or a default user-entity may be automatically selected. Single-user systems will be a commonplace structure. It may be easiest to think of an account in terms of a single billing source that may contain multiple user-entities.


The proposed schema can be represented in either a SQL or NoSql database. I have only included a bare minimum of fields and expect this to grow as requirements are identified. Login ERD

@kurtzilla
kurtzilla / gist:c134c74142ce59d0bdf2d90db7321dcb
Created January 16, 2017 19:17
Deploy react-universally to Heroku from start to finish
fork/clone master branch: git@github.com:ctrlplusb/react-universally.git
cd [your-repo]
npm install
touch .slugignore
echo yarn.lock >> .slugignore
edit config/index.js
~/source/react2017/January/webpack-tuts/my-repo   master  git push heroku master
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 287 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Deleting 1 files matching .slugignore patterns.
@kurtzilla
kurtzilla / gist:d9393676c3c51ebdba947072d4ab4cd4
Last active January 16, 2017 16:33
My steps to heroku deploy
fork master branch: git@github.com:ctrlplusb/react-universally.git
@commit 28769d1e11702c4c4acb3aa26650215a38986527
git clone git@github.com:[my-fork]/react-universally.git [my-repo]
cd [my-repo]
npm install
touch .slugignore
echo yarn.lock >> .slugignore
////////////////////////////////////////////
// Discuss the basic function and purpose of promises
////////////////////////////////////////////
module.exports.recordWebhook = function(json_event){
return new Promise(function(resolve, reject){
return resolve('aok')
});
};
/*********DISCLAIMER***********/
/* there is more than one way to do a sort :) */
function swap(arr, idx1, idx2) {
var temp = arr[idx1];
arr[idx1] = arr[idx2];
arr[idx2] = temp;
}