Skip to content

Instantly share code, notes, and snippets.

Avatar

Johannes Schwenk Schwankenson

View GitHub Profile
@Schwankenson
Schwankenson / Dockerfile
Last active Dec 11, 2020
Accessing a AWS elasticsearch server from outside the VPC
View Dockerfile
FROM alpine:3.12.1
COPY start_ssh_tunnel.sh /root/start_ssh_tunnel.sh
RUN chmod +x /root/start_ssh_tunnel.sh
RUN apk add openssh --no-cache
ENTRYPOINT ["sh","/root/start_ssh_tunnel.sh"]
@Schwankenson
Schwankenson / gist:caf746e2ffc71b1db243
Created Aug 9, 2015
Set wordpress cookie as root cookie for your domain and all subdomains
View gist:caf746e2ffc71b1db243
// If you include this in your functions.php, the wordpress cookie is set for the current domain
// and all subdomains
class RootCookie {
private static $cookie_name;
static public function init() {
self::$cookie_name = "wordpress_logged_in_" . md5(get_site_url());
if ( is_user_logged_in() ) {