Skip to content

Instantly share code, notes, and snippets.

View mattatcha's full-sized avatar

Matt Aitchison mattatcha

View GitHub Profile
@mattatcha
mattatcha / Dockerfile
Created December 28, 2017 18:12 — forked from evanj/Dockerfile
connectbug: Make lots of outbound connections to cause DNS errors in Kubernetes. See https://github.com/kubernetes/kubernetes/issues/45976
FROM python:2.7.13-slim
COPY . /app/
WORKDIR /app
ENTRYPOINT ["python", "connectbug.py"]

Keybase proof

I hereby claim:

  • I am mattatcha on github.
  • I am mattaitchison (https://keybase.io/mattaitchison) on keybase.
  • I have a public key ASDn78Sd3DyGnfnuxhB7GPRQ5yV0E2iP80kJg77gD_7ZIwo

To claim this, I am signing this object:

cd /tmp
rm hello.cmd
rm http.cmd
ssh cmd.io :delete hello
ssh cmd.io :delete http
source ~/.profile.d/demo
clear
[wait 2]# Let's build two quick commands with Cmd.io!
# First,[wait] a simple command that says hello.
@mattatcha
mattatcha / gist:373edb2d5b815d0c2dd3a8d3c3b9ab23
Created April 6, 2017 21:55 — forked from sebsto/gist:20e550876db521710186
Block users access to AWS EC2 meta data
sudo iptables -A OUTPUT -m owner ! --uid-owner root -d 169.254.169.254 -j DROP
@mattatcha
mattatcha / drop_encrypt.go
Created October 30, 2016 03:05 — forked from josephspurrier/drop_encrypt.go
Golang - Drag and Drop AES Encryption and Decryption
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"fmt"
"io"
"io/ioutil"
"os"
@mattatcha
mattatcha / aescmd.go
Created October 30, 2016 03:05 — forked from josephspurrier/aescmd.go
Golang - Encrypt, Decrypt, File Read, File Write, Readline
package main
import (
"bufio"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"fmt"
"io"
"io/ioutil"
import * as React from "react";
import { observable, action, autorun } from 'mobx';
import { Promise } from 'es6-promise';
import { FlatButton } from 'material-ui';
import { StoreManager } from './StoreManager';
export class ModalStore {
storeManager: StoreManager
@observable public isOpen: boolean = false;
@observable public actions = [];

Keybase proof

I hereby claim:

  • I am mattaitchison on github.
  • I am mattaitchison (https://keybase.io/mattaitchison) on keybase.
  • I have a public key ASDDwW3eP7Lelrbubgkmm0jtcMrlQhbVo0gqnVv4UnNIago

To claim this, I am signing this object:

#!/usr/bin/env python
import os
import sys
import platform
import shutil
import cPickle
if platform.system() in ('Windows', 'Microsoft'):
@mattatcha
mattatcha / hhvm_magento_setup.md
Created June 9, 2016 18:25 — forked from tegansnyder/hhvm_magento_setup.md
HHVM Magento Server Setup

I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.

Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.

Install the EPEL, Webtatic, and REMI repos

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm