Skip to content

Instantly share code, notes, and snippets.

View briannhinton's full-sized avatar
🌱
Planning

Brian Hinton briannhinton

🌱
Planning
View GitHub Profile
@briannhinton
briannhinton / formatDate.jsx
Created July 8, 2022 15:07
Convert a date to a string, and reorder the output
const formatDate = (inputDate) => {
const date = new Date(inputDate);
if (!isNaN(date.getTime())) {
const day = date.getDate().toString();
const month = (date.getMonth() + 1).toString();
// Months use 0 index.
return (month[1] ? month : '0' + month[0]) + '/' +
(day[1] ? day : '0' + day[0]) + '/' +
date.getFullYear();
@briannhinton
briannhinton / git-tricks.md
Last active April 6, 2021 22:43
Useful GIT tricks

Git Tips and Tricks

A collection of git tips and tricks. You can suggest more if you know anything else that might be useful that can be listed here.

Git Frequently used and useful command line codes

git config:

Set configuration values for user name,email etc

$ git config --global user.name "Your Name"
@briannhinton
briannhinton / terminal-commands.md
Last active April 19, 2021 00:59
Useful terminal commands for Mac.

Terminal Commands

In the words of the great Willie Wonka:

A little nonsense now and then is relished by the wisest men.

A collection of useful terminal commands:

// remove all node_modules from a folder
@briannhinton
briannhinton / cpuinfo.txt
Last active October 19, 2017 13:08
Harware info for Samsung Chromebook Pro (cpuinfo, neofetch)
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 78
model name : Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz
stepping : 3
microcode : 0xba
cpu MHz : 600.011
cache size : 4096 KB