Skip to content

Instantly share code, notes, and snippets.

View njwest's full-sized avatar
🎹
Groovin

Nick West 韋羲 njwest

🎹
Groovin
View GitHub Profile
@keblodev
keblodev / fetchConstruct.js
Last active February 10, 2019 05:21
a generic wrapper around any react-redux external api call that provides full error handling and event dispatching
export const GENERIC_PREFETCH_CALL = "GENERIC_PREFETCH_CALL";
export const GENERIC_FETCH_SUCCESS_CALL = "GENERIC_FETCH_SUCCESS_CALL";
export const GENERIC_FETCH_FAIL_CALL = "GENERIC_FETCH_FAIL_CALL";
export const handleSuccessError = function(response){
return response.status !== 200 ? response.json().then(error => Promise.reject(error)) : response.json();
}
export const fetchConstruct = function({
url, // required
@mbenatti
mbenatti / 0-font-awesome-bootstap-phoenix.md
Last active February 2, 2024 14:59
Installing Bootstrap 4 + Font Awesome from NPM in Phoenix Framework using sass
  • Tested with Phoenix 1.3

1) Installing sass, font-awesome and bootstrap package's using Brunch

First, install the Sass, Font Awesome, bootstrap(and deps) package:

cd assets

  • npm install --save-dev sass-brunch
  • npm install --save font-awesome
@Venugopal155
Venugopal155 / html_share_buttons.html
Last active April 13, 2022 15:22
Pure HTML Share Buttons
<h3>Pure HTML Share Buttons</h3>
<!-- Social Button HTML -->
<!-- Twitter -->
<a href="http://twitter.com/share?url=<URL>&text=<TEXT>&via=<VIA>" target="_blank" class="share-btn twitter">
<i class="fa fa-twitter"></i>
</a>
@wosephjeber
wosephjeber / ngrok-installation.md
Last active June 4, 2024 07:48
Installing ngrok on Mac

Installing ngrok on OSX

For Homebrew v2.6.x and below:

brew cask install ngrok

For Homebrew v2.7.x and above:

@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active June 19, 2024 18:05
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active May 25, 2024 20:19
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@ksafranski
ksafranski / Common-Currency.json
Last active July 18, 2024 07:42
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},