Skip to content

Instantly share code, notes, and snippets.

View ephraimduncan's full-sized avatar
📚
learning

Ephraim Duncan ephraimduncan

📚
learning
View GitHub Profile
@ephraimduncan
ephraimduncan / gist:d19b8ad8c2ad9eeed457bf96eeb795a4
Created July 10, 2020 19:17
How worse today became. create-react-app Logs. This is frustrating.
Microsoft Windows [Version 10.0.17763.1282]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\Ephraim Atta-Duncan\Documents\Projects\tutorial-projects\learning-react\stephen-grider>npx create-react-app my-app
Creating a new React app in C:\Users\Ephraim Atta-Duncan\Documents\Projects\tutorial-projects\learning-react\stephen-grider\my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
@ephraimduncan
ephraimduncan / electron-new-browser.js
Last active July 25, 2020 17:11
Electron Open Link In New Brower.
"use strict";
var isElectronRenderer = function isRenderer() {
if (typeof process === "undefined") return true;
if (!process) return true;
if (!process.type) return false;
return process.type === "renderer";
};
module.exports = function (url, event) {
@ephraimduncan
ephraimduncan / build-arch.sh
Last active September 26, 2020 15:58
Building Arch Package
# Clone the arch repository
git clone [the package url]
# Build It
cd [the package]
makepkg -si
# Remove Package
sudo pacman -R [package-name]
@ephraimduncan
ephraimduncan / nodejs-lts.sh
Created September 26, 2020 18:44
Install Nodejs LTS on any computer
# Quick Install Nodejs LTS Version
curl -sL install-node.now.sh/lts | bash
@ephraimduncan
ephraimduncan / bash-colors.md
Created September 30, 2020 12:43 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@ephraimduncan
ephraimduncan / nodejs-colors.sh
Last active September 30, 2020 12:53
Nodejs Console Color Reference
Reset = "\x1b[0m"
Bright = "\x1b[1m"
Dim = "\x1b[2m"
Underscore = "\x1b[4m"
Blink = "\x1b[5m"
Reverse = "\x1b[7m"
Hidden = "\x1b[8m"
FgBlack = "\x1b[30m"
FgRed = "\x1b[31m"
@ephraimduncan
ephraimduncan / node-colors.js
Created September 30, 2020 13:10
Onliner Functions to Add Colors to console logs
// Source: https://stackoverflow.com/a/46705010
const { r, g, b, w, c, m, y, k } = [
['r', 1],
['g', 2],
['b', 4],
['w', 7],
['c', 6],
['m', 5],
['y', 3],
Operator Purpose For DataType
= Equal to operation string
== Equal to operation string
!= is not equal to string
< is less than in ASCII alphabetical order string
> is greater than in ASCII alphabetical order string
-z if a string is empty (or null) string
-n if a string is not empty (or not null) string
-eq is equal to number
-ne is not equal to number
@ephraimduncan
ephraimduncan / ABCToken.sol
Created September 17, 2021 00:28 — forked from abelliumnt/ABCToken.sol
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.4+commit.1dca32f3.js&optimize=true&gist=
pragma solidity 0.6.4;
import "./Context.sol";
import "./IERC20.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
@ephraimduncan
ephraimduncan / install-docker-on-ubuntu-guide.md
Created January 2, 2022 11:37
Installing Docker on Ubuntu

Update your existing list of packages

sudo apt update

Install a few prerequisite packages

sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common