git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
var urls = []string{ | |
"https://splice.com/", |
#!/bin/bash | |
# Install daemon tools | |
if [ "$UID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
if [ ! -e /usr/bin/gcc ] || [ ! -e /usr/bin/make ]; then | |
echo gcc or make not installed going to install dev tools in 5 seconds press ^C to exit | |
sleep 6 | |
yum -y groupinstall 'Development Tools' |
Do you want know what's the orange color from Bitcoin logo? Here's the colours: | |
Hexadecimal: | |
#FF9900 | |
RGB | |
(255,153,0) | |
Any suggestions are welcome! | |
Fonts: http://www.color-hex.com/color/ff9900 and https://bitcointalk.org/index.php?topic=224522.0 |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
#!/usr/bin/env sh | |
has_gid () { | |
cut -d: -f1,4 /etc/passwd | grep -q "^${1}:${2}" || return 1 | |
} | |
# example: ensure_user btsync 1000 1000 | |
ensure_user () { | |
local user=$1 | |
local uid=$2 |
CTRL + A
— Move to the beginning of the lineCTRL + E
— Move to the end of the lineCTRL + [left arrow]
— Move one word backward (on some systems this is ALT + B)CTRL + [right arrow]
— Move one word forward (on some systems this is ALT + F)CTRL + U
— (bash) Clear the characters on the line before the current cursor positionCTRL + U
—(zsh) If you're using the zsh, this will clear the entire lineCTRL + K
— Clear the characters on the line after the current cursor positionESC + [backspace]
— Delete the word in front of the cursor^(?<timestamp>\w+\s+\d+,\s+\d+\s+\d+:\d+:\d+\.\d+)[^\]\n]*\]\s+(?<loglevel>\w+) - (?<full_message>(?:(?:Request: \[(?<request_ip>[^:]+).*Token \((?<username>[^)]+))?(?:\[?(?<status_source>[\w\s]+)((\]|: )))?(?:Adding (?<session_number>\d) sessions\.)?(?:Found session GUID of (?<session_guid>[^\s]+))??(?:Session (?<playback_session_guid>[^\s]+) \((?<playback_session_number>[^\)]+)\) is (?<placyback_session_status>\w+))?(?:using profile (?<transcode_profile>.*))?(?:.*\/transcode\/session\/(?<transcode_session_guid>[^\/]+))?(?:It took (?<time_taken>[\d\.]+) sec to (?<action_taken>.*))?)?(?:Content-Length of (?<file_path>.*\/(?<file_name>[\w\s]+\.(avi|mp4|mkv|m4v|wmv|mpg|mpeg|divx))(\s|$)))?.*)$ |
Short script to monitor walletbalance and channelbalance for LND, and log to csv file for later graphing. You need a working LND, and jq installed.
first setup by editing balances.txt and add a header line
date,walletbalance,channelbalance
add the following script, edit lndbalances.sh
#!/bin/bash