A Pen by Laurent Baumann on CodePen.
This quick guide will help you set up a Cloudflare Tunnel on your Linux server !
Cloudflare Tunnel provides you with a secure way to connect your resources to the web without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP, instead, a lightweight daemon in your infrastructure (cloudflared
) creates outbound-only connections to Cloudflare’s edge. Cloudflare Tunnel can connect HTTP web servers, SSH servers, remote desktops, and other protocols safely to Cloudflare. This way, your origins can serve traffic through Cloudflare without being vulnerable to attacks that bypass Cloudflare. (Source)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
portainer: | |
image: portainer/portainer-ce # Pulled from Docker Hub | |
container_name: portainer | |
# restart: always | |
ports: | |
- 9000:9000 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const https = require('https') | |
const options = { | |
hostname: 'api.github.com', | |
method: 'https', | |
port: 443, | |
method: 'GET', | |
path: '/repos/<owner>/<repo>/issues?state=all&per_page=100', | |
headers: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.collections.HashMap | |
fun main() { | |
with(CaesarCypherDecoder()) { | |
val message = decode("QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD", 'K', 'H') | |
println("Decoded message : $message") | |
bruteForce("CZGGJ RJMGY DI V NZXMZODQZ HVIIZM") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package LOG320.labo3.helpers; | |
import java.util.Collections; | |
import java.util.Map; | |
import java.util.TreeMap; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Forked from https://gist.github.com/juanmf/4147a9b7010c7b04c003 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type DelegateFunction = (...args: any[]) => void; | |
export class ActionDelegate { | |
private delegation: DelegateFunction[]; | |
constructor() { | |
this.delegation = [] | |
} | |
public add(f: DelegateFunction): ActionDelegate { | |
this.delegation.push(f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
db=$1 | |
s3bucket=$2 | |
filename=$db.$(date +%F.%H%M%S).sql.gz | |
filepath=~/backups/$filename | |
echo "Backuping MySQL Database $db ..." | |
mkdir -p ~/backups | |
/usr/bin/mysqldump -u root $db | gzip > $filepath |
- Create certificates
- Edit Docker options
- Restart Docker
- Copy client certificates from host
- (optional) Add remote endpoint in Portainer
Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.
NewerOlder