Skip to content

Instantly share code, notes, and snippets.

Coding Furiously

Abraham Hernandez abranhe

Coding Furiously
View GitHub Profile
abranhe / reactstreaming.js
Created Jun 18, 2021 — forked from dabit3/reactstreaming.js
React Streaming code from live broadcast
View reactstreaming.js
import React from 'react';
import logo from './logo.svg';
import './App.css';
import ReactPlayer from 'react-player'
import { HashRouter, Link, Switch, Route } from 'react-router-dom'
import AuthComponent from './AuthComponent'
import { Auth, API } from 'aws-amplify'
import { createComment as CreateComment } from './graphql/mutations'
import { listComments as ListComments } from './graphql/queries'
import { onCreateComment as OnCreateComment } from './graphql/subscriptions'
abranhe / mysqlsync
Created Mar 4, 2021 — forked from samhernandez/mysqlsync
Sync remote mysql database to local over ssh
View mysqlsync
# This script assumes you have ssh access to a remote server
# Both databases are backed up to sql files in the same directory
# this script is executed from.
# Usage:
# 1. Make sure this file is executable with `chmod +x mysqlsync`
# 2. Set the credentials for the variables at the top
# (Remember, no spaces around the '=' sign)
# 3. Run it from a directory where you'd like the backup files to go:
abranhe /
Created Feb 21, 2021
Cloudformation Lamda Random Value
# Just adding support for a lambda
Type: AWS::IAM::Role
Version: '2012-10-17'
- Effect: Allow

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes
 UseKeyChain yes
abranhe /
Created Oct 7, 2020 — forked from lukaszgrolik/
Commonly used names for CSS font-weight values

unknown source

value name
100 extralight/ultralight
200 light/thin
300 book/demi/light
400 regular/normal
500 medium
600 semibold/demibold
abranhe / .htaccess
Created Sep 30, 2020 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /
abranhe / minifier.php
Created Aug 27, 2020
WordPress Minifier
View minifier.php
* W3C Fix and HTML minifier
* Nobody knows how this work, so don't touch it!!!
abranhe / example1.sql
Created Jul 18, 2020
Example SQL Relationship
View example1.sql
id serial,
title varchar(100) NOT NULL,
author varchar(100) NOT NULL,
published_date timestamp NOT NULL,
isbn char(12),
UNIQUE (isbn)
abranhe / Props
Created Jun 23, 2020 — forked from mynameispj/Props
Estimated reading time in PHP, by Brian Cray
View Props
Total props to Brian Cray:
abranhe /
Created Jun 13, 2020 — forked from Kartones/
PostgreSQL command line cheatsheet


Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)