Skip to content

Instantly share code, notes, and snippets.

View comountainclimber's full-sized avatar
🦍

Maxwell Lasky comountainclimber

🦍
  • Crested Butte, Colorado
View GitHub Profile
@comountainclimber
comountainclimber / download-count.js
Created January 31, 2020 05:12
Print Neon Wallet download count to console (node)
const https = require("https");
const options = {
headers: {
"User-Agent": "comountainclimber"
}
};
https.get(
"https://api.github.com/repos/CityOfZion/neon-wallet/releases",
@comountainclimber
comountainclimber / docker-destroy-all.sh
Created April 23, 2019 19:16 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@comountainclimber
comountainclimber / gist:6ae8030fd9477dd48f654aae0b90c001
Created July 11, 2018 04:59 — forked from wikimatze/gist:9790374
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

Website #1 (jQuery).

Website #2 (React)

  • Creation of a react app using best coding standards and practices to implement the beautiful new design created by @Nat1988. (second attempt :D) React should be more familiar to the community so I thought it would be a better option moving forward as both NEON and the website grow.
  • (React, Webpack, Eslint, Prettier.js)
@comountainclimber
comountainclimber / promise_series.js
Created January 10, 2017 03:46
fun with promises
const list = ['grape stomper', 'headband', 'purple urkle']; // collection that you want to perform async operation on
const results = [];
// series becomes an array of "thenable" Promises which have their
// succesfull results pushed into a seperate array
const series = list.map((item) => () => {
return Promise.resolve(asyncFunc(item))
.then(result => results.push(result));
});
const doAction = (action) => {
const actions = {
'hack': () => 'hack',
'slash': () => 'slash',
'run': () => 'run'
};
if (typeof actions[action] !== 'function') {