Skip to content

Instantly share code, notes, and snippets.

@epipheus
epipheus / git-backup-to-AWS-S3.sh
Created June 24, 2022 03:51 — forked from philippb/git-backup-to-AWS-S3.sh
Complete git repository backup script to AWS S3
#!/bin/bash
# Script to backup git repo to S3
# Set bucket, dir, password and account to use for the backup. I keep mine in local env vars
# These are set by localrc which lives on an encrypted home directory and is executed by my bashrc
bucket=$GITHUB_BACKUP_BUCKET
dir=$GITHUB_BACKUP_DIR
password=$GITHUB_BACKUP_PASSWORD
account=$GITHUB_ACCOUNT
@epipheus
epipheus / audit-on-push.yml
Created May 17, 2022 11:45 — forked from LukeMathWalker/audit.yml
GitHub Actions - Rust setup
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
@epipheus
epipheus / main.dart
Last active July 13, 2021 02:18
passing arguments as a map
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Navigation with Arguments',
initialRoute: '/',
#!/bin/sh
exec 2>/dev/null
sleep 1
screen -wipe
sleep 1
if ! screen -list | grep -q "ms-run" || [ "$1" = "forcestart" ]; then
#!/bin/sh
echo "--------- MINERSTAT ASIC HUB (UNINSTALL) -----------"
echo "Uninstall => Start"
# kill running process
screen -S minerstat -X quit
screen -S ms-run -X quit # kill running process
killall minerstat.sh
killall minerstat_antminer.sh
#!/bin/sh
exec 2>/dev/null
mount -o remount,rw / #remount filesystem
echo "--------- MINERSTAT ASIC HUB (INSTALL) -----------"
if [ "$1" != "" ]; then
if [ "$1" != "null" ]; then
echo "TOKEN: ok"
else
@epipheus
epipheus / 1. ELK.install
Created December 1, 2019 00:12 — forked from PavloBezpalov/1. ELK.install
ELK Stack with Rails (Elasticsearch, Logstash, Kibana) on Ubuntu VPS
INSTALL JAVA
$ sudo apt-get update && sudo apt-get install default-jre
INSTALL ELASTIC SEARCH https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
$ wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
$ echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
$ sudo apt-get update && sudo apt-get install elasticsearch
$ sudo update-rc.d elasticsearch defaults 95 10
$ sudo service elasticsearch restart
$ sudo service elasticsearch status
@epipheus
epipheus / 1. ELK.install
Created December 1, 2019 00:12 — forked from PavloBezpalov/1. ELK.install
ELK Stack with Rails (Elasticsearch, Logstash, Kibana) on Ubuntu VPS
INSTALL JAVA
$ sudo apt-get update && sudo apt-get install default-jre
INSTALL ELASTIC SEARCH https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
$ wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
$ echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
$ sudo apt-get update && sudo apt-get install elasticsearch
$ sudo update-rc.d elasticsearch defaults 95 10
$ sudo service elasticsearch restart
$ sudo service elasticsearch status
@epipheus
epipheus / iterm2-solarized.md
Created November 13, 2019 07:57 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@epipheus
epipheus / steps.md
Created May 6, 2018 17:39 — forked from cgcardona/steps.md
Steps for running a Bitcoin Cash (ABC) node on digital ocean. Forked from these steps: https://medium.com/signal-chain-weekly/how-im-running-a-bitcoin-full-node-on-digital-ocean-for-40-a-month-dfc328ba9604

Setup

  1. Ubuntu 16.04.3 x64
  2. 2 GB Memory / 60 GB Disk
  3. 200 GB block storage volume

Create user

get ip-address from digital ocean