Skip to content

Instantly share code, notes, and snippets.

View shopglobal's full-sized avatar
💻
deploying Electronero 2.0

⛓️INTERCHAINED ⚡Electronero Network ʕ•̫͡•ʔ-̫͡-ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ-̫͡-ʔ shopglobal

💻
deploying Electronero 2.0
View GitHub Profile
@shopglobal
shopglobal / explanation.md
Created March 20, 2018 02:06 — forked from masak/explanation.md
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@shopglobal
shopglobal / Dependancies_Windows.md
Last active March 7, 2018 08:26
Windows dependencies helper

Windows: Binaries for Windows are built on Windows using the MinGW toolchain within MSYS2 environment. The MSYS2 environment emulates a POSIX system. The toolchain runs within the environment and cross-compiles binaries that can run outside of the environment as a regular Windows application.

Preparing the build environment

Pre-Install

Download and Install MSYS2

http://msys2.github.io/

Download and install the MSYS2 installer, either the 64-bit or the 32-bit package, depending on your system.

@shopglobal
shopglobal / Ethereum_private_network.md
Created March 1, 2018 22:57 — forked from 0mkara/Ethereum_private_network.md
Ethereum private network configuration guide.

Create your own Ethereum private network

Introduction

Used nodes:

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
Linux localhost.localdomain 4.14.5-200.fc26.x86_64 #1 SMP Mon Dec 11 16:29:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@shopglobal
shopglobal / gist:6e6f642e5cd7833832e404ff650f6bf4
Created February 17, 2018 21:56 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@shopglobal
shopglobal / selenium
Created December 21, 2017 03:44 — forked from adeubank/selenium
Set up selenium on Ubuntu 16.04 as a service
#!/bin/bash
case "${1:-''}" in
'start')
if test -f /tmp/selenium.pid
then
echo "Selenium is already running."
else
export DISPLAY=localhost:99.0
java -Dwebdriver.gecko.driver="/usr/lib/geckodriver/geckodriver" -jar /usr/lib/selenium/selenium-server-standalone.jar -port 4444 > /var/log/selenium/output.log 2> /var/log/selenium/error.log & echo $! > /tmp/selenium.pid
@shopglobal
shopglobal / get-current-crypto-prices.js
Created December 15, 2017 07:52 — forked from gmcdev/get-current-crypto-prices.js
Map current cryptocurrency prices into Google Sheets
/* USAGE:
* Sheet -> Tools -> Script Editor...
* Paste this script
* Update the map (below) to your preferences
* Create a button in your Sheet and Assign Script: `test`
* et voila profit
*/
function test() {
// maps currencies.tokens to sheet ranges
getPrices({
@shopglobal
shopglobal / cryptocurrency-converter.js
Created December 15, 2017 07:51
Google Sheets Cryptocurrency Converter Script
function performLookups() {
convertCrypto('BTC', 'USD', 2, 3);
convertCrypto('LTC', 'USD', 3, 3);
convertCrypto('ETH', 'USD', 4, 3);
}
function convertCrypto(symbol, currency, row, column) {
var url = 'https://min-api.cryptocompare.com/data/price?fsym=' + symbol + '&tsyms=' + currency;
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
I make those changes in the original code:
https://github.com/pmitchev/testcoin/commit/bde47c6b7c575ab04aee43cc372ff1ebd3306d7a
I buy blank Ubuntu 14.04 VPS (2 GB RAM) (32GB on compile time)
I install dependencies:
wget https://raw.githubusercontent.com/forknote/cryptonote-generator/master/configure.sh
bash configure.sh
Clone and compile:
git clone https://github.com/pmitchev/testcoin/
cd testcoin
mkdir -p build/release; cd build/release
@shopglobal
shopglobal / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created December 1, 2017 08:24 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \