Skip to content

Instantly share code, notes, and snippets.

:shipit:
Workin'

Randy Burgess wrburgess

:shipit:
Workin'
Block or report user

Report or block wrburgess

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wrburgess
wrburgess / example.js
Created Oct 10, 2019
javascript es6 default params
View example.js
// When you set a function parameter to `(arg = val)` that sets the default
// for the argument. It is not a forced assignment.
//
// Example:
function postSomething(name = 'Megan') {
console.log('name:', name);
}
postSomething(); // console logs 'name: Megan'
@wrburgess
wrburgess / example.js
Created Sep 19, 2019
React useState with single object
View example.js
const { useState } = React;
function signupUser() {
return new Promise(resolve => {
setTimeout(resolve, 1000);
});
}
const initialState = {
username: "",
View gist:7f8d7feea27cdbe3f2f52403430c2f6b

Error Message Scenarios

  • There is an unknown column in the file
  • There is a missing required column in the file
  • There is missing data in the file
  • The file is not a properly formatted csv file

There is an unknown column in the file

View example.md

Create HTML Web App

  • az webapp up --location westeurope --name parcel-test-2
View example.md

Set custom subdomain

  • command: ngrok http -subdomain=inconshreveable 5000
  • result: http://inconshreveable.ngrok.io on port 5000
@wrburgess
wrburgess / example.md
Last active Oct 5, 2019
npm and nvm shortcuts
View example.md

Update Node with NVM and move global packages

  • nvm install node --reinstall-packages-from=node or nvmup
  • npm update -g or npmgup
  • npm list -g --depth 0 or npmgout

Aliases

alias nor="npm outdated"
@wrburgess
wrburgess / example.md
Created May 7, 2019
Rails new with postgres
View example.md

rails new myapp --database=postgresql

View index.js
import Vue from 'vue'
import Vuex from 'vuex'
import firebase from 'firebase'
import router from '@/router'
Vue.use(Vuex)
export const store = new Vuex.Store({
state: {
appTitle: 'My Awesome App',
View index.js
import Vue from 'vue'
import Vuex from 'vuex'
import firebase from 'firebase'
import router from '@/router'
Vue.use(Vuex)
export const store = new Vuex.Store({
state: {
appTitle: 'My Awesome App',
@wrburgess
wrburgess / heroku_pg_db_reset.md
Last active Nov 30, 2018 — forked from zulhfreelancer/heroku_pg_db_reset.md
How to reset PG Database on Heroku?
View heroku_pg_db_reset.md

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

heroku restart; heroku pg:reset DATABASE --confirm APP-NAME; heroku run rake db:migrate

You can’t perform that action at this time.