Skip to content

Instantly share code, notes, and snippets.

View zeroeth's full-sized avatar
🤖
🐱 🤖 🐱 🤖

[0] zeroeth

🤖
🐱 🤖 🐱 🤖
View GitHub Profile
@zeroeth
zeroeth / keypresses.pde
Last active December 20, 2015 06:29
multiple keypresses in processing
// Booleans to hold the key states
boolean keyUp,keyDown;
void setup()
{
size (600, 600);
}
@zeroeth
zeroeth / gist:6074368
Last active December 20, 2015 04:58
places to explore
CreativeApplications.net
Processing.org/exhibition
processingjs.org/exhibition
instructables.com
makezine.com/projects
@zeroeth
zeroeth / colorFade.pde
Created July 24, 2013 14:43
color fading
color colorOne = color(255, 0, 0);
color colorTwo = color(0, 255, 255);
void setup() {
size(600, 600);
}
void draw() {
// give us a number between 0.0 and 1.0
@zeroeth
zeroeth / mousekey.pde
Created July 22, 2013 19:22
mouse and key input
int radius = 400;
int positionX = 10;
int positionY = 10;
void setup() {
size(600, 600);
}
@zeroeth
zeroeth / blobs.pde
Created July 22, 2013 14:35
processing blobs
/*
PROCESSINGJS.COM HEADER ANIMATION
MIT License - F1lT3R/Hyper-Metrix
Native Processing Compatible
*/
// Set number of circles
int count = 40;
// Set maximum and minimum circle size
int maxSize = 100;
@zeroeth
zeroeth / delegate_multicast.cs
Last active December 19, 2015 03:19
C# Delegate Addition.
// read http://msdn.microsoft.com/en-us/library/vstudio/ms173172.aspx for more info
// store methods in a dictionary of event names
//
public delegate void MethodCallback();
private Dictionary<string, MethodCallback> event_listeners = new Dictionary<string, Methodcallback>();
// create key entry first
@zeroeth
zeroeth / parsley_error_wrapper.js
Created May 30, 2013 20:22
Parsley.js error div several parents up.
$(document).ready(function() {
$('.parsley-form').parsley({
errors: {
container: function (element, isRadioOrCheckbox) {
var $container = element.parents().children(".parsley-error-container");
if ($container.length === 0) {
$container = $("<div class='parsley-error-container'></div>").insertAfter(element);
}
return $container;
}
@zeroeth
zeroeth / bloggerfun.html
Created May 11, 2013 05:06
Attach post labels to blog post as classes, see it in use at http://moctopsgolbblogspotcom.blogspot.com/ view source and search for "dogs_post"
<!-- this goes in the <head> -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
// For every post
$('.post-outer').each(function() {
// Find all its labels
var label_links = $(this).find('.post-labels a');
// Extract the text from them and append _post
@zeroeth
zeroeth / echos.ctp
Created April 30, 2013 00:12
php echos
<?php
echo "blah"
echo "blah"
?>
to
<?php echo "blah" ?>
<?php echo "blah" ?>