This file contains 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 | |
function get_gateway_interface() { | |
route|grep default|awk '{print $8}' | |
} | |
# Redirect all incoming traffic to the other port | |
function redirect_port_to_port() { | |
# $1 from port | |
# $2 to port |
This file contains 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 | |
# | |
# Get host IP and add it locally as docker_host_machine so it could be accessible eg. via http://docker_host_machine | |
# ================================ | |
# Requirements: iproute2 | |
# | |
cat /etc/hosts | grep -v "docker_host_machine" > /etc/hosts.2 && mv /etc/hosts.2 /etc/hosts | |
echo "$(ip route show|grep src|awk '{print $9}') docker_host_machine" >> /etc/hosts |
This file contains 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 | |
# Installs a recent version of docker-compose | |
# as on recent Ubuntu version it's pretty old | |
# but also this script could help to keep consistency | |
# between developer and production environment | |
# Based on: https://gist.github.com/wdullaer/f1af16bd7e970389bad3 | |
COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oP "[0-9]+\.[0-9]+\.[0-9]+$" | tail -n 1` | |
sudo sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose" | |
sudo chmod +x /usr/local/bin/docker-compose |
This file contains 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 "SEOTags.html.twig" as SEOTags %} | |
{% block header_meta %} | |
{{ | |
SEOTags.draw({ | |
'title': 'Hello World', | |
'description': 'Hi, this is a test', | |
'keywords': ['first', 'second', 'third'], | |
'image': 'http://.../image.jpg' | |
}) |
This file contains 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
#!/usr/bin/python | |
import os | |
import collections | |
def getPackageName(fileName): | |
exp = fileName.split('-') | |
found = False | |
name = "" | |
sep = "" |
This file contains 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 main | |
import ( | |
"fmt" | |
"os" | |
"strings" | |
"github.com/fsouza/go-dockerclient" | |
//"github.com/tonnerre/golang-pretty" | |
) |
This file contains 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 | |
# generate new personal ed25519 ssh key | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network | |
eval "$(ssh-agent -s)" |
This file contains 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
<?php | |
/** | |
*@Annotation | |
*/ | |
class AnnotatedDescription | |
{ | |
public $value; | |
public $type; | |
public $desc; | |
} |
NewerOlder