Skip to content

Instantly share code, notes, and snippets.

View phiniezyc's full-sized avatar

Chance phiniezyc

  • Atlanta, GA
View GitHub Profile
@phiniezyc
phiniezyc / passport.js
Created November 19, 2017 09:03 — forked from manjeshpv/passport.js
Passport.js using MySQL for Authentication with Express
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@phiniezyc
phiniezyc / README-Template.md
Created February 2, 2018 22:38 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@phiniezyc
phiniezyc / sample.md
Created March 24, 2018 05:19 — forked from bradtraversy/sample.md
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

@phiniezyc
phiniezyc / webdev_online_resources.md
Created July 16, 2018 21:48 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@phiniezyc
phiniezyc / destructuring.js
Last active September 4, 2018 09:36 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Spread Operator
//Ex1:
Math.max(5, 6, 8, 9, 11, 999);
// 999
//Ex2:
const numbers = [5, 6, 8, 9, 11, 999];
Math.max(...numbers)
@phiniezyc
phiniezyc / gist:e219e9707530b080b5e44c63ce91acc0
Created September 4, 2018 10:44 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@phiniezyc
phiniezyc / jSLinkedList.js
Last active July 30, 2019 23:20
Javascript Implementation of a Linked List
class Node {
constructor(value) {
this.value = value;
this. next = null;
}
}
class LinkedList {
constructor(value) {
@phiniezyc
phiniezyc / reverseStr.js
Created March 27, 2019 07:40
How to reverse a string JS
function strRev(str) {
let left = 0;
let right = str.length-1;
const strArr = str.split("");
while (left < right) {
let tempLeft = strArr[left];
let tempRight = strArr[right];
strArr[left] = tempRight;
strArr[right] = tempLeft;
@phiniezyc
phiniezyc / steps.js
Created April 23, 2019 06:58
Stairs problem that console logs the number of # for each level and a space for the appropriate level.
function stairs(num) {
for (let row = 0; row< num; row++) {
let level = "";
for (let column = 0; column< num; column++){
if (column <= row) {
level += "#";
}
else {
level += " ";
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
You've now created an alias to git log called git lg that will display the nicer output showed before. Try it out by typing git lg (or git lg -p to see the lines that have changed).
https://dev.to/christopherkade/up-your-git-game-and-clean-up-your-history-4j3j?utm_source=digest_mailer&utm_medium=email&utm_campaign=digest_email