Skip to content

Instantly share code, notes, and snippets.

View ephraimduncan's full-sized avatar
📚
learning

Ephraim Duncan ephraimduncan

📚
learning
View GitHub Profile
@lopspower
lopspower / README.md
Last active July 17, 2024 12:58
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@dingzeyuli
dingzeyuli / check_github_repo_size
Created December 16, 2016 22:34
Check the size of a github repo before downloading
# http://webapps.stackexchange.com/questions/39587/view-estimated-size-of-github-repository-before-cloning
# tested on macOS
echo https://github.com/torvalds/linux.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k https://api.github.com/repos/'{}' | grep size
# output:
# "size": 1746294,
@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

@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
@bradtraversy
bradtraversy / flutter_setup.md
Last active June 29, 2024 07:23
Flutter dev setup & notes
@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.
*
@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 / 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
@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.)