Skip to content

Instantly share code, notes, and snippets.

View slambert's full-sized avatar

Steve Lambert slambert

View GitHub Profile
@slambert
slambert / variables demo.pde
Created September 15, 2015 16:40
offMouse
/*
Steve Lambert
offMouse
September 15, 2015
Note: where you declare your variable
*/
// Global Variables (usable in every loop/function we make)
int offMouse = 0; //declare AND initialize the variable
@slambert
slambert / Super Stunning Psychedelic Booleans v0.1.pde
Created September 15, 2015 16:26
Done with one IF statement
/*
Steve Lambert
Super Stunning Psychedelic Booleans v0.1
September 15, 2015
Done with one IF statement
*/
void setup(){
size(800,600); // how big it is, you know this.
println("Welcome to Steve's Psychedelic Light Show");
@slambert
slambert / robot w red eyes that moves.pde
Created September 8, 2015 18:22
a robot with red eyes that moves
void setup() {
size(480, 120);
smooth();
background(240);
rectMode(CENTER);
// done with setup
}
void draw() {
@slambert
slambert / 4 squares moving with different colors.pde
Created September 8, 2015 14:19
This is an example for class about the things they have questions about today.
/*
Steve Lambert
September 8, 2015
This is an example for class about the things
they have questions about today.
*/
@slambert
slambert / WordPress Thumbnail
Created February 28, 2015 20:20
WordPress Thumbnail Function
// Thumbnail Function - this creates a default thumbnail if one is specified
function get_thumb ($post_ID){
$thumbargs = array(
'post_type' => 'attachment',
'numberposts' => 1,
'post_status' => null,
'post_parent' => $post_ID
);
$thumb = get_posts($thumbargs);
if ($thumb) {
@slambert
slambert / category.php
Created December 1, 2013 14:47
Category.php page from my site
<?php get_header() ?>
<!-- created with category.php -->
<?php get_sidebar() ?>
<hr />
<div id="content">
<!--checking if this is a for sale page-->
<?php
@slambert
slambert / home.php
Created November 30, 2013 21:46
home page of my site. Uses multiple queries, but I think there is a better way.
<?php get_header() ?>
<!-- generated with home.php -->
<div id="home-banner">
<?php putRevSlider("tsleadin") ?>
</div><!-- #home-banner-->
<div id="home-container">
@slambert
slambert / add-art-rss20-sample.xml
Created May 20, 2013 17:02
a sample RSS feed to flesh out how it would work
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Art Channel Name</title>
<link>http://museum.art/add-art/</link>
<description>Brief description of the venue providing the images.</description> <!-- limit what's displayed in the Add-Art interface to a couple sentences. -->
<image>http://museum.art/add-art/icon.png</image> <!-- a small, standarized size logo image for the organization. To be displayed in the interface. -->
<pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate> <!-- show in interface as 12 June '13 -->
<lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate> <!-- needed? -->
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
@slambert
slambert / Sonar 100 v041.ino
Last active February 26, 2019 04:53
3 sonar pinging, light controller - for 100% piece
/*
Sonar 100% Program
v.0.4.1
This version has:
* 3 sonar units
* LEDs to show when triggered
* variable trigger distance set with a pot
* An error LED to show if a sonar unit is out.
@slambert
slambert / lambert-flasher-program.pde
Last active October 6, 2015 00:28
Custom Light Controller program for Arduino and relays
//relay pins
#define relayAPin 2
#define relayBPin 3
#define relayCPin 4
#define relayDPin 5
#define relayEPin 6
#define relayFPin 7
#define relayGPin 8
#define relayHPin 9