Create a template service file at /etc/systemd/system/secure-tunnel@.service
. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
package main | |
// Core code borrowed from the cmd/ files in http://github.com/sabhiram/go-wol | |
import ( | |
"bufio" | |
"errors" | |
"flag" | |
"fmt" | |
"os" |
[Unit] | |
Description=Keeps a tunnel to 'remote.example.com' open | |
After=network.target | |
[Service] | |
User=autossh | |
# -p [PORT] | |
# -l [user] | |
# -M 0 --> no monitoring | |
# -N Just open the connection and do nothing (not interactive) |
Cian Johnston, July 2017
A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.
This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.
The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
require "typhoeus" | |
loop do | |
puts "In Loop" | |
res = Typhoeus.get("https://george.sparkasse.at/") | |
if res.success? | |
unless res.body =~ /George arbeitet an sich/ | |
`say "George is back online!"` | |
return | |
end |
# Use this to look for broken links in your app. | |
# crawls the development server http://localhost:3000 | |
# Suggestion: Also check to make sure that intentional 404s | |
# are handled gracefully by app. | |
task :crawl => :environment do | |
require 'anemone' | |
root = 'http://localhost:3000' | |
options = {:discard_page_bodies => true, :verbose => true} |
machine: | |
node: | |
version: 6.2.0 | |
environment: | |
PATH: "$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH" | |
MIX_ENV: "test" | |
services: | |
- postgresql | |
database: |
# https://github.com/indiehosters/discourse | |
# https://github.com/indiehosters/docker-discourse/blob/master/Dockerfile | |
version: '2' | |
networks: | |
lb_web: | |
external: true | |
back: | |
driver: bridge | |
services: |