docker network create easyhaproxy
docker run -d \
--name easy-haproxy \
--rm \
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
docker network create test | |
cat << EOF > master.conf | |
bind 0.0.0.0 | |
appendonly yes | |
appendfilename "appendonly.aof" | |
EOF | |
docker run -it --rm -v $PWD/master.conf:/etc/master.conf --name master --network test -d redis:6.2 redis-server /etc/master.conf |
docker run --security-opt seccomp=unconfined \
--security-opt apparmor=unconfined \
-it --rm alpine:edge sh
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing buildah
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
git branch -a | grep remotes | xargs -l | cut -d"/" -f3 | xargs -l git checkout | |
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset); %(color:red)%(objectname:short)%(color:reset); %(contents:subject); %(authorname); (%(color:green)%(committerdate:relative)%(color:reset))' | |
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 | |
echo toKebabStyle("TestingConversion"); | |
function toKebabStyle($input) { | |
$result = preg_replace_callback( | |
'/([a-z])([A-Z])/', | |
function ($match) use ($input) { | |
return $match[1] . "-" . $match[2]; | |
}, |
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 | |
class MyTable | |
{ | |
protected $field_id; | |
protected $field_value; | |
/** | |
* MyTable constructor. | |
* @param $field_value |
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
version: '3.2' | |
services: | |
wordpress: | |
image: wordpress:4.8-php7.1 | |
environment: | |
- WORDPRESS_DB_HOST=mysql-container | |
- WORDPRESS_DB_USER=user | |
- WORDPRESS_DB_PASSWORD=password | |
- WORDPRESS_DB_NAME=wordpress | |
volumes: |
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/env python | |
""" Print all of the clone-urls for a GitHub organization. | |
It requires the pygithub3 module, which you can install like this: | |
$ sudo yum -y install python-virtualenv | |
$ mkdir scratch | |
$ cd scratch | |
$ virtualenv my-virtualenv | |
$ source my-virtualenv/bin/activate |
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
Sub SMS() | |
Dim Result As String | |
Result = EnviarSMS("21", "999999999", "Mensagem", "Usuario", "Senha") | |
MsgBox Result | |
End Sub | |
Function RequestURL(Method As String, Dict As Variant) As String | |
Dim QueryString As String | |
Dim Key As Variant |
NewerOlder