Skip to content

Instantly share code, notes, and snippets.

@mariowise
mariowise / gist:cdaba1153236269311750491317e8871
Created February 1, 2017 12:51
localhost database ops task
namespace :db do
FOLDER = "tmp/dumps"
def credentials
password = (ENV['DEV_DB_PASSWORD'] != "") ? "-p#{ENV['DEV_DB_PASSWORD']}" : ""
"-u #{ENV['DEV_DB_USER']} #{password}"
end
def database_name
"#{ENV['DEV_DB_NAME']}_development"
@mariowise
mariowise / App.js
Last active August 15, 2018 20:16
React States and Props
import React, { Component } from 'react';
import './App.css';
import BrandsApi from './api/brand'
import ModelsApi from './api/model'
class App extends Component {
state = {
brands: [],
models: [],
import React, { Component } from 'react';
import './App.css';
import SelectBrand from './components/SelectBrand'
import SelectModel from './components/SelectModel'
class App extends Component {
state = {}
render() {