Skip to content

Instantly share code, notes, and snippets.

View fuzzylimes's full-sized avatar

Zach Cochran fuzzylimes

View GitHub Profile
<div class="pulse red live"></div>
<h3 class="live">LIVE!</h3>
@fuzzylimes
fuzzylimes / notes.md
Last active April 15, 2018 19:10
Docker Notes
@fuzzylimes
fuzzylimes / notes.md
Last active May 3, 2018 10:40
postgresql notes

Basic (baisc) postgres items

  • psql - start postgres terminal (logs into default database)
  • psql <dbname> - start postgres terminal in specific database
  • \l - list all databases
  • \q - exit the terminal
  • \d - list all tables in selected database
  • Make sure to end all commands with a ; character
  • You don't have to type commands in CAPSLOCK, lower case is fine
  • You cannot delete a database that you are currently viewing (\c out of it first)
  • Can use -- for comments
@fuzzylimes
fuzzylimes / notes.md
Last active May 9, 2018 21:19
Javascript Notes

Javascript Notes

Basics

Notes

  • No issue using either single ' or double " quotes, it's all preference/styling

Loging to console

console.log('hello world!');
@fuzzylimes
fuzzylimes / app.js
Created May 16, 2018 10:48
User thing
const express = require('express');
const exphbs = require('express-handlebars')
const app = express();
// Handlebars Middleware
app.engine('handlebars', exphbs({defaultLayout: 'main'}));
app.set('view engine', 'handlebars');
function homePage(req, res) {
@fuzzylimes
fuzzylimes / package.json
Created May 31, 2018 23:59
Trying to figure out express-sessions
{
"name": "requesttest",
"version": "1.0.0",
"description": "Testing out requests",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev:server": "nodemon --ignore sessions/ server.js"
},
"author": "fuzzylimes",
@fuzzylimes
fuzzylimes / git_notes.md
Last active July 15, 2018 19:02
Git commands that I always forget...

Basic stuff

  • git init will create an empty git repo
  • Git does not store multiple versions of the code
  • Initial commit will create the master branch

git log

  • Shows the git commit history
  • HEAD will follow the latest commit

Checkout to specific commit

@fuzzylimes
fuzzylimes / learningPandas.md
Created June 23, 2018 11:07
Python Pandas Notebook

Things that I need to be able to do

Import from csv into memory

To create a dataframe from a csv, you can use the following:

df = pd.read_csv('pandas_dataframe_importing_csv/example.csv')

If you have a different delimiter than a comma, you can use the sep parameter:

df = pd.read_csv('pandas_dataframe_importing_csv/example.csv', sep="\|", engine="python")
@fuzzylimes
fuzzylimes / helpfulSnips.md
Created July 15, 2018 19:02
Helpful javascript snippets

Remove all type unidentified from array

arr = arr.filter(function(n){ return n != undefined }); 

Fully clear a terminal

process.stdout.write('\033c');
@fuzzylimes
fuzzylimes / README.md
Created January 20, 2019 15:33
Spring Initializer Unzip, Open, and Delete