Creates a docker registry for storing built images.
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
| <?php declare(strict_types = 1); | |
| namespace App\Core\Form\Type; | |
| use App\Core\Service\Content\TextUtils; | |
| use Symfony\Component\Form\AbstractType; | |
| use Symfony\Component\Form\FormBuilderInterface; | |
| use Symfony\Component\Form\Extension\Core\Type\{TextType, LanguageType, SubmitType, CheckboxType}; | |
| use Symfony\Component\Form\FormEvent; | |
| use Symfony\Component\Form\FormEvents; |
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 tornado.ioloop | |
| import tornado.web | |
| import json | |
| import os | |
| class MainHandler(tornado.web.RequestHandler): | |
| config = {} | |
| def initialize(self, config): | |
| self.config = config |
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 | |
| if ! ping -c 1 google.com -W 10 > /dev/null 2>&1; then | |
| interface=$(ifconfig -a |grep -E "(enp([a-z0-9]+)|eth([0-9]+))" | grep -v "veth" | awk '{print $1}' | sed -r "s/://g") | |
| echo " >> Bringing up the ethernet interface $interface" | |
| killall dhclient -9 > /dev/null 2>&1 | |
| dhclient $interface | |
| echo " >> Setting up DNS" |
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 | |
| 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 |
Usage:
./docker-container-ip.sh container_name_here
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
| <?php | |
| namespace Wolnosciowiec\Twig; | |
| /** | |
| * Shorten post preserving the HTML formatting | |
| */ | |
| class PostShortenTwigExtension extends \Twig_Extension | |
| { | |
| /** |
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 | |
| # | |
| # 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 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
| # | |
| # Created for free for the anarchist movement around the world. | |
| # See iwa-ait.org, zsp.net.pl, wolnosciowiec.net | |
| # | |
| - name: Schedule a clean up for Docker images | |
| become: yes | |
| cron: | |
| name: "docker-clean-up-images" | |
| minute: "0" |
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
| - name: Install misc admin packages | |
| become: yes | |
| apt: name={{ item }} state=present | |
| with_items: | |
| - htop | |
| - iotop | |
| - mytop | |
| - iftop | |
| - iptraf | |
| - telnet |