Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Milos Bejda mbejda

🎯
Focusing
Block or report user

Report or block mbejda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mbejda
mbejda / boot.sh
Last active Apr 17, 2019
boot-script
View boot.sh
#!/bin/bash -xe
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
cd ~/init;
sudo curl https://gist.githubusercontent.com/mbejda/fdfcb9891f3cd72a0adafb6dab10ab7b/raw/docker-compose.yml > ~/init/docker-compose.yml;
sudo curl https://gist.githubusercontent.com/mbejda/fdfcb9891f3cd72a0adafb6dab10ab7b/raw/upload.ini > ~/init/upload.ini;
docker-compose -f /home/ec2-user/init/docker-compose.yml up -d;
while [ ! -d /var/lib/docker/volumes/init_wp_themes ]
do
sleep 2
done
@mbejda
mbejda / Caddyfile
Created Apr 15, 2019 — forked from abiosoft/Caddyfile
Caddy wordpress docker-compose
View Caddyfile
:80
root /usr/src/wordpress
gzip
fastcgi / wordpress:9000 php
rewrite {
if {path} not_match ^\/wp-admin
to {path} {path}/ /index.php?_url={uri}
}
log stdout
errors stderr
@mbejda
mbejda / .env
Last active Apr 19, 2019
docker-compose.yml
View .env
DOMAIN=
MYSQL_ROOT_PASSWORD=
WORDPRESS_SITEURL=
WORDPRESS_HOME=
WORDPRESS_DB_NAME=
WORDPRESS_DB_USER=
WORDPRESS_DB_PASSWORD=
DB_PREFIX=
BACKUP_INTERVAL=
WORDPRESS_IMAGE=latest-alpine
@mbejda
mbejda / docker-compose.yml
Last active Apr 8, 2019
wordpress docker compose
View docker-compose.yml
version: '3.3'
volumes:
s3data:
driver: local
services:
s3vol:
image: elementar/s3-volume
command: /data s3://${S3_BUCKET}
environment:
- BACKUP_INTERVAL=${BACKUP_INTERVAL}
@mbejda
mbejda / event.json
Created Mar 3, 2019
Cognito Post Confirmation Event JSON
View event.json
{
"version": "1",
"region": "",
"userPoolId": "",
"userName": "",
"callerContext": {
"awsSdkVersion": "",
"clientId": ""
},
"triggerSource": "",
@mbejda
mbejda / 1517649096.js
Created Feb 3, 2018
Created with Copy to Gist
View 1517649096.js
/* SmtpJS.com - v2.0.1 */
Email = {
send: function(e, o, t, n, a, s, r, c) {
var d = Math.floor(1e6 * Math.random() + 1),
i = "From=" + e;
i += "&to=" + o, i += "&Subject=" + encodeURIComponent(t), i += "&Body=" + encodeURIComponent(n), void 0 == a.token ? (i += "&Host=" + a, i += "&Username=" + s, i += "&Password=" + r, i += "&Action=Send") : (i += "&SecureToken=" + a.token, i += "&Action=SendFromStored", c = a.callback), i += "&cachebuster=" + d, Email.ajaxPost("https://smtpjs.com/v2/smtp.aspx?", i, c)
},
sendWithAttachment: function(e, o, t, n, a, s, r, c, d) {
var i = Math.floor(1e6 * Math.random() + 1),
m = "From=" + e;
@mbejda
mbejda / 1514834785.html
Created Jan 1, 2018
Created with Copy to Gist
View 1514834785.html
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1   {color: blue;}
p    {color: red;}
</style>
</head>
<body>
@mbejda
mbejda / 1513653640.js
Created Dec 19, 2017
Created with Copy to Gist
View 1513653640.js
var foo = function(){
console.log("hello world");
}
@mbejda
mbejda / 1513653095.js
Created Dec 19, 2017
Created with Copy to Gist
View 1513653095.js
var foo = function(){
console.log("hello world");
}
@mbejda
mbejda / 1513652863.txt
Created Dec 19, 2017
Created with Copy to Gist
View 1513652863.txt
var foo = function(){
console.log("hello world");
}
You can’t perform that action at this time.