Skip to content

Instantly share code, notes, and snippets.

View RobertShippey's full-sized avatar

Robert Shippey RobertShippey

View GitHub Profile
@RobertShippey
RobertShippey / gist:1670791
Created January 24, 2012 15:48
track struct init
struct Track {
char TrackName[MAXCHARS];
int Genre;
int PlayMin;
int PlaySec;
};
Track MusicTrack[MAXTRACKS] = { //opening the array
{"Holst_Mars", 1, 15, 10}, //first struct in the array with each item in the struct
{"New_York", 2, 3, 50}, //second
@RobertShippey
RobertShippey / gist:1878992
Created February 21, 2012 21:14
Pacman - Will
#include "stdafx.h"
#include "gwin.h"
class Pacman {
public:
int x;
int y;
int Scale;
// direction
@RobertShippey
RobertShippey / gist:1918458
Created February 26, 2012 19:26
Scape Invaders - Tony
// Space Invaders Project.cpp : Defines the entry point for the application.
// Author:
// ID:
// Version:
// Date: 17 Feb 2012
// Description:
#include "stdafx.h"
#include "gwin.h"
/*
* use import to include classes defined within the java.io package
*/
import java.io.*;
/**
* This example will demonstrate how to write information to a file.
* <p>
* It also shows you how to use comments that can be used by javadoc to produce
* HTML api document files for your class. There are a number of javadoc tags that
GSound myTrack;
GSample myPlayableTrack = myTrack.load("path/to/file.mp3", true);
myPlayableTrack.play();
//It looks like that's passing back a GError so you could try this:
GError myError = myTrack.load("path/to/file.mp3", true);
Gwin.writeString(myError.getErrorMsg());
<script type="text/javascript" src="http://api.geoloqi.com/js/geoloqi.min.js"></script>
<script type="text/javascript">
geoloqi.init();
geoloqi.auth = {'access_token': 'ecfd-02969442b655bda83da16a6abab0fea5b4f44dc3'};
function getLastLocation() {
geoloqi.get('place/nearby', function(result, error) {
document.write(response.places.name);
});
@RobertShippey
RobertShippey / podio_bigdump.py
Created July 27, 2012 09:52 — forked from gadamc/podio_bigdump.py
podio_bigdump
#!/usr/bin/env python
from pypodio2 import api
import sys, shutil, os, json
c = api.OAuthClient(sys.argv[1],sys.argv[2], sys.argv[3], sys.argv[4])
orginfo = c.transport.get(url = '/org/')
def writerawtext(filename, data):
try:
@RobertShippey
RobertShippey / gist:5596872
Created May 17, 2013 04:08
Icky semi-pseudo-code for the pi thing
url = "http://whatever.com/"
reference_page = ""
current_page = ""
wait_time = 5 * 60 #seconds
setup( )
while True:
download_page( )
if not same_as_reference( ):
<script>
function switchFrame(a) {
f = document.getElementById("preview");
l = document.getElementById("endLink");
if( f.src == a.href ) {
if( f.style.display == "inline" ) {
f.style.display = "none";
l.style.display = "none";
} else {
f.style.display = "inline";
<?php
$folder = '/path/to/folder/';
$watermark = '/path/to/Logo.jpg';
$files = scandir($folder);
foreach($files as $file) {
//do your work here
var_dump($folder.$file);
// Load the stamp and the photo to apply the watermark to