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 / git-remote.md
Created June 3, 2022 18:16
Git Remote origin commands

Add a new git remote url

git remote add origin git://new.url.here

Remove remote url

git remote remove origin
@bradtraversy
bradtraversy / graphql-queries-mutations.md
Created June 2, 2022 17:37
GraphQL Queries & Mutations

GraphQL Queries & Mutations

These are the GraphQL queries and mutations for the YouTube course.

Get names of all clients

{
  clients {
    name
 }
@phortuin
phortuin / postgres.md
Last active July 16, 2024 04:19
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

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 / 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],
@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]
@abelliumnt
abelliumnt / ABCToken.sol
Last active November 9, 2022 16:27
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.
*
@bradtraversy
bradtraversy / flutter_setup.md
Last active June 29, 2024 07:23
Flutter dev setup & notes
@chibicode
chibicode / README-Twemoji-React.md
Last active February 24, 2024 18:08
A dead simple React.js Twemoji component.

Twemoji + React

A dead simple React Twemoji component.

Requirements: twemoji

npm install --save twemoji
@paolocarrasco
paolocarrasco / README.md
Last active July 18, 2024 17:08
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug