Skip to content

Instantly share code, notes, and snippets.

View darrenmothersele's full-sized avatar
🏠
Working from home

Darren Mothersele darrenmothersele

🏠
Working from home
View GitHub Profile
#pragma once
#include "ofMain.h"
class testApp : public ofBaseApp{
public:
int randomCounts[20];
void setup();
void update();
void draw();
#include "testApp.h"
#include <ofGraphics.h>
void testApp::setup(){
ofSetFrameRate(60);
ofSetBackgroundAuto(false);
ofEnableAlphaBlending();
ofEnableSmoothing();
ofBackground(255);
#include "testApp.h"
#include <ofGraphics.h>
void testApp::setup(){
ofSetFrameRate(60);
ofSetBackgroundAuto(false);
ofEnableAlphaBlending();
ofEnableSmoothing();
ofBackground(255);
#include "testApp.h"
#include <ofGraphics.h>
void testApp::setup(){
ofSetFrameRate(60);
ofEnableSmoothing();
ofBackground(255);
ofSetColor(0);
f = 0;
@darrenmothersele
darrenmothersele / gist:8052657
Created December 20, 2013 09:52
Converting, compressing and resizing and image for the web with ImageMagick
# just convert and compress, strip EXIF etc
convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% original.jpg new.jpg
# resize
convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% -resize 940x480 original.jpg new.jpg
@darrenmothersele
darrenmothersele / Vagrantfile
Created January 14, 2014 08:36
Very simple Vagrantfile showing how to use private ip (so files can be shared using NFS) and increased memory.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
@darrenmothersele
darrenmothersele / generator_scss.rb
Created February 9, 2014 13:34
Jekyll plugin to allow compliation of Compass SASS, as explained here: http://darrenmothersele.com/blog/2014/02/07/from-prototype-to-drupal-theme-2/
require 'sass'
require 'pathname'
require 'compass'
require 'compass/exec'
module Jekyll
class CompassGenerator < Generator
safe true
def generate(site)
Compass::Exec::SubCommandUI.new(%w(compile)).run!
@darrenmothersele
darrenmothersele / weird-generators.php
Created February 18, 2016 15:02
Weird behaviour when using nested Generators
<?php
/**
* Weird behaviour when nesting Generators
*/
/**
* Turn some items into a Generator
* @param array ...$items
* @return Generator
*/
@darrenmothersele
darrenmothersele / cyril-logo.cy
Created May 10, 2016 11:16
Cyril Logo drawn using Cyril
color hotPink
scale 2
shape
vert -1,-1
vert -1,1
vert 1,0
end
move 0,0,0.01
scale 0.7
i: 10.5
do 36 times
rotate 10
i: i + 0.01
particle 0.1,0,0,0.4 * noise(i)
push
scale 0.4
color hotPink