Skip to content

Instantly share code, notes, and snippets.

@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

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

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*
node -e "require('crypto').randomBytes(48, function(ex, buf) { console.log(buf.toString('hex')) });"

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 = '') => {

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...
@kurtzilla
kurtzilla / remove_rocks_on_map.lua
Created October 24, 2024 04:14 — forked from morsk/remove_rocks_on_map.lua
remove rocks on map [Factorio]
/c --[[ remove rocks ]]
local function count_in(t, s)
t[s] = (t[s] or 0) + 1
end
local counts = {}
for _,e in pairs(game.player.surface.find_entities_filtered{type = {"simple-entity"}}) do
--[[ starts rock- , has -rock- in middle, or ends -rock ]]
if e.name:match("^rock%-") or e.name:match("%-rock%-") or e.name:match("%-rock$") then
count_in(counts, e.name)
e.destroy()