Skip to content

Instantly share code, notes, and snippets.

View mattjay's full-sized avatar

Matt Johansen mattjay

View GitHub Profile
@mattjay
mattjay / robot.js
Created December 6, 2012 22:16
Demo
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@mattjay
mattjay / robot.js
Created December 6, 2012 22:21 — forked from f6p/robot.js
delete
//delete
@mattjay
mattjay / ec2MongoUpgrade
Created December 14, 2013 06:28
Increase the disk space on a MongoDB EC2 Instance in Amazon Web Services
1. Create a Snapshot of the current EC2 instance running Mongo. First, note down the Volume ID from your Instance list since for whatever reason you can't see any instance info in the Snapshot page. Second, go to the Snapshot page and click [Create Snapshot]. Choose the Volume ID you just noted down and name the Snapshot and create it.
2. Create a new Volume with the backup Snapshot. In your instance list note the Availability Zone of the instance you are trying to upgrade. Go to the Volumes page and click [Create Volume]. Pick Standard and enter how many GB you'd like to create. This should be larger than the Volume you just created the Snapshot from. Then from the drop down choose the Snapshot you just created and click create. Also choose the Availability Zone that the instance you are upgrading is in as they must be the same.
3. Find the instance you'd like to upgarde in the Instances list and note the name of the disk which will be next to "Block devices" (most likely /dev/sda1).
4. Stop the Instance
@mattjay
mattjay / TwitterDMSpam
Last active August 29, 2015 13:56
Most links blocked - spammers try new things
DON'T CLICK
https://www.google.com/search?q=jq+epet&rlz=itiqu88&espv=39&es_sm=3&tbm=isch&imgil=q3quxjoM%253A%253B%253Fq%253Dtbn%253AANdexyutazEx_iufhmsl7pO88DxVJE64dkBcxnQ%253B800%253B541%253BFJKloqimifJM%253Bhttp://www.ferrinimuebles.com.ar/_click.here?unj&source=a
DON'T CLICK
Twitter has started blocking most links in DMs but has a certain whitelist of domains that people are allowed to link to.
Google is one of those domains so Twitter spammers have updated their techniques.
The above is a link I got from a hacked account that I follow. Figured I'd share for others to check it out.

Keybase proof

I hereby claim:

  • I am mattjay on github.
  • I am mattjay (https://keybase.io/mattjay) on keybase.
  • I have a public key whose fingerprint is 9569 71B3 F9CF 0CB4 8D46 16B8 8860 85C3 27F5 95E1

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am mattjay on github.
  • I am mattjay (https://keybase.io/mattjay) on keybase.
  • I have a public key whose fingerprint is 50EC FB2B C1A0 1DBF BD8D BAB2 6D40 C95B 6DDB C9AB

To claim this, I am signing this object: