Skip to content

Instantly share code, notes, and snippets.

View jaycody's full-sized avatar

Jason Stephens jaycody

View GitHub Profile
OpenSimplexNoise noise;
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
int numFrames = 100;
PVector field(float x,float y){
float amount = 2.5;
float scale = 0.03;
float radius = 0.45;
double value1 = 400.0*noise.eval(scale*x,scale*y,radius*cos(TWO_PI*1.0*(frameCount-1)/numFrames),radius*sin(TWO_PI*1.0*(frameCount-1)/numFrames));
double value2 = 400.0*noise.eval(1000+scale*x,scale*y,radius*cos(TWO_PI*1.0*(frameCount-1)/numFrames),radius*sin(TWO_PI*1.0*(frameCount-1)/numFrames));
//int value2 = (int) Math.round(value);
float parameter1 = (int) Math.round(value1)/100.0;
OpenSimplexNoise noise;
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@tsulej
tsulej / nlinesvfield.pde
Created April 29, 2016 19:42
Nonintersecting lines vector field drawing
// generateme.tumblr.com, 2016
// idea by zach lieberman
// choose variant
int variant = 0; // 0 or 1;
void setup() {
size(800, 800);
background(0, 5, 25);
strokeWeight(0.8);
PGraphics g ;
void setup() {
size(500,500);
smooth(8);
noStroke();
fill(0);
g = createGraphics(270,270);
g.beginDraw();
g.background(255);
@axialmarketsteve
axialmarketsteve / test_weather.py
Created July 9, 2013 20:46
Test case that gets the weather in New York from weather.com. Auto-generated using Selenium IDE and going to File > Export Test Case As... > Python 2 (WebDriver).
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
import unittest
class Weather(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://www.weather.com/"
self.verificationErrors = []
@mhdhejazi
mhdhejazi / CopyAsanaTasks.php
Created October 24, 2012 16:43
Copy/Move project to a new workspace in Asana
function asanaRequest($methodPath, $httpMethod = 'GET', $body = null)
{
$apiKey = 'ASANA_API_KEY_HERE'; /// Get it from http://app.asana.com/-/account_api
$url = "https://app.asana.com/api/1.0/$methodPath";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;
curl_setopt($ch, CURLOPT_USERPWD, $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@underhilllabs
underhilllabs / color-theme-leuven-org-section.el
Created May 17, 2011 16:11
orgmode variables for an emacs color theme from color-theme-leuven.el
;; Org
(org-agenda-clocking ((t ,clock-line)))
(org-agenda-column-dateline ((t (:inherit org-column))))
;; (org-agenda-column-dateline ((t (:background "deep sky blue" :height 79 :family "Consolas"))))
(org-agenda-current-time ((t (:weight bold :underline t :foreground "purple"))))
(org-agenda-date ((t (:height 1.6 :weight bold :foreground "#0063F5")))) ; "#87C9FC"
(org-agenda-date-today ((t (:height 1.6 :weight bold :foreground "purple")))) ; "#CCCCFF" ; inherit
(org-agenda-date-weekend ((t (:height 1.6 :weight bold :foreground "dim gray")))) ; "#B6B2AE" ; inherit
(org-agenda-diary ((t (:weight bold :foreground "green4" :background "light blue"))))
(org-agenda-dimmed-todo-face ((t (:foreground "gold2")))) ; org-blocked-todo