Skip to content

Instantly share code, notes, and snippets.

View resba's full-sized avatar
👀

Matt Sowden resba

👀
View GitHub Profile
@resba
resba / CSS Playground
Created February 26, 2011 04:51
Just some CSS stuff
/* you align the body text to center. since the body is the root element (and position on a sheet matters) AND since your not putting any text in the body, but in the content, you can just text-align: left; the content for it to work. */
body {
text-align: center;
margin: 0 auto;
padding: 0 0 0 0;
}
.content {
min-width: 1100px;
min-height: 500px;
background: url(../img/content-bk.png);
@resba
resba / hideDiv.js
Created April 25, 2011 17:51
hideDiv Javascript Function
// hideDiv Function v1.5 by Matthew Sowden. Based off the Middle Bucks Institute of Technology Online Yearbook Student Content Check Script, Originally Designed by Matthew Sowden.
// Author: Matthew Sowden (designtheinternet@gmail.com)
// Website: www.resbah.com
// Disclaimer: This code is provided on an AS-IS basis and does NOT offer any support.
// License: You are free to use this code in any project or modify it in any way, so long as the credit is given.
function hideDiv(div,datacheck){
if (document.getElementById(datacheck).innerHTML == '') //Statement checks to see if datacheck contains any text between the opening and closing tag.
{
document.getElementById(div).innerHTML = ''; //If the above statement is TRUE, this ID-defined element has its content set to nothing.
@resba
resba / rollengine.php
Created June 8, 2011 16:33
Roll a d*
<?php /*
//
//
// Roll a d* Script
//
// Version: 1.0
//
// Author: resba [https://www.github.com/resba]
//
// Description: Just like rolling a dice! Roll a die virtually and get a return number!
@resba
resba / slap.java
Created December 13, 2011 03:07
Messing about
/*
Written inpromptu by Matt Sowden (resba) with Ron Melanz (questionablei)
Records stored: 12/12/11 @ 10:00pm
*/
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
       Player player = null;
       if (sender instanceof Player) {
           player = (Player) sender;
       }
@resba
resba / HelloWorld.java
Created January 25, 2012 15:54
Intro To Java
package com.resbah.assignments.HelloWorld;
/**
* @(#)HelloWorld.java
*
*
* @author Matthew Sowden
* @version 0.0.1-SNAPSHOT 2012/1/25
* @description JavaDoc Stuff; Hello World application
*/
@resba
resba / SimpleGame.java
Created January 25, 2012 19:04
SimpleGame
package com.resbah.SimpleGame;
import java.applet.*;
import java.awt.Color;
import java.awt.Event;
import java.awt.Graphics;
import java.awt.Image;
/**
*
* THIS CODE IS SO WRONG BUT WHO CARES \o/
@resba
resba / db.php
Created January 26, 2012 19:13
SQLFunc
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_db = "localhost";
$database_db = "web";
$username_db = "root";
$password_db = "";
$db = mysql_pconnect($hostname_db, $username_db, $password_db) or trigger_error(mysql_error(),E_USER_ERROR);
?>
@resba
resba / REButton.java
Created March 29, 2012 12:18
REButton
package com.thenetdev.util;
import javax.swing.JButton;
import java.util.UUID;
/**
*
* Extended JButton instance who's only real purpose is to include a unique ID
* for the button it defines. Designed for Matt Sowden's Tic Tac Toe program
* for use in determining weather or not a button inside a button array
@resba
resba / mc.lol
Created May 31, 2012 18:27
Minecraft Startup
HAI
I HAS A SERVAR ITZ "MINECRAFT"
GIMMEH LOCATIONZ BTW I WANT JAR LOCATIONZ
GIMMEH JAVA BTW I WANT JAVA LOCATIONZ
JAVA, WTF?
OMG "/usr/bin/java" BTW YOUR ON LINUX!
VISIBLE SERVAR, GTFO
OMGWTF
VISIBLE "JAVA DOESN'T WANTZ TO PLAYS! D:"
@resba
resba / t.py
Created January 31, 2013 22:18
HowDoIPython
class TestClass:
def __init__(one,two,three):
self.one = one
self.two = two
self.three = three
def getOne():
return self.one
def getTwo():