Skip to content

Instantly share code, notes, and snippets.

@Tanner
Tanner / Test.java
Created October 14, 2011 20:12
JPanel with preferred size
import java.awt.*;
import javax.swing.*;
public class Test extends JPanel {
public Test() {
setPreferredSize(new Dimension(400, 400));
}
public static void main(String[] args) {
JFrame frame = new JFrame();
@Tanner
Tanner / gist:1375475
Created November 18, 2011 03:12
CS 1331 Dynamic-Type Casts
public class Test {
public static void main(String[] args) {
Test test = new Test();
}
public Test() {
Corgi a = (Corgi)(new TeaCupCorgi()); // Compiles and Runs
Corgi b = (TeaCupCorgi)(new Corgi()); // Compiles, but doesn't Run
Corgi c = new Corgi(); // Compiles (this is the "new Corgi()" portion above on line 8)
@Tanner
Tanner / extensionize.sh
Created September 18, 2012 02:12
Creates a zip file without .git, .gitignore, or .DS_Store
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: ${0} directory"
exit 1
fi
if [ -d ${1} ]; then
DIR_NAME=$(basename ${1})
If you have accepted an internship for next semester, you have until the end of Phase II Registration (Jan. 2-11, 2013) to register with the Division of Professional Practice to gain the following benefits:
  • test
  • done
Delivered-To: tannerlawndart@gmail.com
Received: by 10.217.44.3 with SMTP id y3csp56693wev;
Mon, 28 Jan 2013 08:51:10 -0800 (PST)
X-Received: by 10.236.81.7 with SMTP id l7mr15882264yhe.112.1359391870268;
Mon, 28 Jan 2013 08:51:10 -0800 (PST)
Return-Path: <cc-newsandevents-owner@lists.gatech.edu>
Received: from deliverator5.gatech.edu (deliverator5.gatech.edu. [130.207.165.165])
by mx.google.com with ESMTP id x20si4271074anh.54.2013.01.28.08.51.09;
Mon, 28 Jan 2013 08:51:10 -0800 (PST)
@Tanner
Tanner / gist:4999123
Last active December 14, 2015 00:29

A few days ago I was using Tweedle on my Nexus 4. Tweedle is well made Android Twitter client. It has a simple interface and does the job simply without any fuss.

I have always noticed that it would not retain a drafted tweet that I was working on. I would switch applications to reference whatever it is I wanted to talk about and come back to Tweedle to find that my post was gone.

I expressed my confusion about this to the creator of Tweedle and apparently the application does retain your draft if you switch back to Tweedle via the recent apps screen.

What was I doing? Switching by going to the home screen, and relaunching the application from there.

This confused me as I have not noticed any other application on Android or iOS that has this behavior.

The error message is: 'Mage: Exception raised calling commitQueue on Mage Account source: Mage error occurred 3 times in a row running set_account_password(account_id=account/[redacted], account_password=XXXXX) : 'Bad Gateway''
/**
* Create a socket and connect to the server.
*
* @param server_ip Server IP (dotted quad)
* @param server_port Port Number
* @return Socket descriptor
*/
int server_connect(char *server_ip, unsigned int server_port) {
// Create a socket using TCP
int sock;
@Tanner
Tanner / map.geojson
Created August 12, 2013 19:10
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.