Skip to content

Instantly share code, notes, and snippets.

View mattatcha's full-sized avatar

Matt Aitchison mattatcha

View GitHub Profile
#!/usr/bin/env python
import os
import sys
import platform
import shutil
import cPickle
if platform.system() in ('Windows', 'Microsoft'):
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 = [];
@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"
@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 / 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
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 / 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"]