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
#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;
#include "testApp.h"
#include <ofGraphics.h>
void testApp::setup(){
ofSetFrameRate(60);
ofSetBackgroundAuto(false);
ofEnableAlphaBlending();
ofEnableSmoothing();
ofBackground(255);
@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 / 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
@darrenmothersele
darrenmothersele / angular.io-docs-mod.css
Created August 8, 2016 07:06
Angular.io Docs Modification for Printing
md-toolbar { display: none; }
.side-nav { display: none; }
header.hero { display: none; }
body { padding: 0 !important; }
.main-footer {display: none; }
article { max-width: 100% !important; }
.c10 { width: 100% !important; }
.l-content-small { padding: 0 !important; }
.showcase .showcase-content { padding: 0 !important; }

Keybase proof

I hereby claim:

  • I am darrenmothersele on github.
  • I am mothersele (https://keybase.io/mothersele) on keybase.
  • I have a public key ASD8xQOKZYoX4-VlRzCPjjI7h-oVz005gtd5Kqc2u9_zaQo

To claim this, I am signing this object: