Skip to content

Instantly share code, notes, and snippets.

View Schwankenson's full-sized avatar

Johannes Schwenk Schwankenson

View GitHub Profile
@Schwankenson
Schwankenson / Dockerfile
Last active April 8, 2024 19:31
Accessing a AWS elasticsearch server from outside the VPC
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 August 9, 2015 10:54
Set wordpress cookie as root cookie for your domain and all subdomains
// 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() ) {