Skip to content

Instantly share code, notes, and snippets.

@coderabbi
coderabbi / git-fix.md
Last active January 28, 2021 10:54
Git Alias: fix

Ever wish you could add something to a prior commit, but you've committed a few times since?

Simple, right? git commit --fixup <hash-to-fix> followed by git rebase -i <last-good-hash>

I don't know about you, but that's one more hash than I want to deal with and since the --autostash option sets up the rebase properly for me, I really don't want to have to deal with my editor, either....

Consider the "git fix" alias.

Definition:

export const GoogleApi = function(opts) {
opts = opts || {}
const apiKey = opts.apiKey;
const libraries = opts.libraries || [];
const client = opts.client;
const URL = 'https://maps.googleapis.com/maps/api/js';
const googleVersion = '3.22';
let script = null;
/* VT100 terminal reset (<ESC>c) */
console.log('\033c');
/* numbers comparations */
> '2' == 2
true
> '2' === 2

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');