Skip to content

Instantly share code, notes, and snippets.

@ksaylor11
ksaylor11 / Usage
Created August 1, 2018 13:10 — forked from petersuhm/Usage
Docker Compose file I use during development of WP Pusher
$ docker-compose up -d
Creating network "wppusherplugin_default" with the default driver
Creating wppusherplugin_db_1
Creating wppusherplugin_wordpress_1
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ecec64717d29 wordpress:php5.6-apache "docker-entrypoint.sh" 5 seconds ago Up 2 seconds 0.0.0.0:80->80/tcp wppusherplugin_wordpress_1
54ed735f15e4 mysql:5.7 "docker-entrypoint.sh" 7 seconds ago Up 4 seconds 3306/tcp wppusherplugin_db_1
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"
@ksaylor11
ksaylor11 / timestamp.py
Last active October 15, 2018 18:18 — forked from anonymous/gist:5952491
timestamp for today at midnight
#still need to figure out what to do about tzinfo supposedly tzinfo=timezone.utc should work, but still needs to be tested
#currently print at every step just to evaluate what is going on
#need to look into (tzinfo=pytz.utc) and install pytz for some success
import datetime
d=datetime.datetime.now(timezone.utc)
print(d)
dt=d.replace(hour=00,minute=00,second=00)
print(dt)
ts=dt.timestamp(dt)
print(ts)