Skip to content

Instantly share code, notes, and snippets.

View stephepush's full-sized avatar

Stephen Peters stephepush

View GitHub Profile
@stephepush
stephepush / gist:4b3be6a317822417cf9402d96bce4d16
Created July 9, 2020 15:17
Rails Console Adding models printout
~/.../PryPress/pry-press-backend // ♥ > rails console
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Running via Spring preloader in process 50251
Loading development environment (Rails 6.0.3.2)
2.6.1 :001 > user1 = User.create(name: "William T. Riker", street_address: "745 Maple lane", zipcode: "22302", isAdmin: false)
(3.7ms) BEGIN
User Create (14.3ms) INSERT INTO "users" ("name", "street_address", "zipcode", "isAdmin", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["name", "William T. Riker"], ["street_address", "745 Maple lane"], ["zipcode", "22302"], ["isAdmin", false], ["created_at", "2020-07-08 19:57:00.031328"], ["updated_at", "2020-07-08 19:57:00.031328"]]
(32.0ms) COMMIT
=> #<User id: 1, n
@stephepush
stephepush / passport-tutpsql.sql
Last active January 28, 2020 21:27
passport-tutorial-postgresschema
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.6 (Ubuntu 11.6-1.pgdg19.04+1)
-- Dumped by pg_dump version 12.1 (Ubuntu 12.1-1.pgdg19.04+1)
-- Started on 2020-01-23 11:08:59 EST
SET statement_timeout = 0;
@stephepush
stephepush / gist:9f3a9cc9f8042a02f169ff2268281f63
Created January 23, 2020 16:07
email-collector-pg-backup-dump
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.6 (Ubuntu 11.6-1.pgdg19.04+1)
-- Dumped by pg_dump version 12.1 (Ubuntu 12.1-1.pgdg19.04+1)
-- Started on 2020-01-23 11:03:53 EST
SET statement_timeout = 0;
@stephepush
stephepush / SearchableList.js
Created April 27, 2019 03:35
Code as copied from Taming the State in React's Searchable List component from ~page 5
import React from 'react';
import List from "./List";
import Search from "./Search";
class SearchableList extends React.Component {
constructor(props) {
super(props);
this.state = {
query: '',
@stephepush
stephepush / todo.mysql
Created January 24, 2019 20:43
SQL schema for Laracasts todo app
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 24, 2019 at 08:34 PM
-- Server version: 5.7.23
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@stephepush
stephepush / index.php
Created December 18, 2018 23:45
php code for survey page project
<?php
try {
require_once 'includes/pdo_connect.php';
$prelim =
"INSERT INTO prelim_guest_Info
(first_name, last_name, email, phone_number)
VALUES (:first_name, :last_name, :email, :phone_number)";
$stmt_prelim = $db->prepare($prelim);
$stmt_prelim->bindParam(':first_name', $_POST["first_name"]);
$stmt_prelim->bindParam(':last_name', $_POST["last_name"]);
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 18, 2018 at 01:48 AM
-- Server version: 5.7.23
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@stephepush
stephepush / george-washington-carver-tribute.markdown
Created September 3, 2017 16:57
George Washington Carver Tribute
@stephepush
stephepush / fcc-random-quote-generator.markdown
Last active September 3, 2017 15:46
FCC Random Quote Generator
@stephepush
stephepush / fcc-weather-app.markdown
Last active September 3, 2017 04:03
FCC Weather App