Skip to content

Instantly share code, notes, and snippets.

View AlcaDesign's full-sized avatar
💜
Doing something

Jacob Foster AlcaDesign

💜
Doing something
View GitHub Profile
@AlcaDesign
AlcaDesign / chat-lines-tweaks.css
Last active April 29, 2018 01:37
Alca's custom CSS for modch.at (https://modch.at) | Sections are separated into files and "modch.at-custom.css" is all of them together.
.chat-lines {
font-size: 14px;
}
class Rose {
PShape shape;
PVector stemStart, stemEnd;
float targetStemLength, growthTimeStart, growthTimeEnd;
float n, d, targetR, r;
float i;
Rose(int index) {
stemStart = new PVector(
random(
const request = require('request'),
_kraken = request.defaults({
baseUrl: 'https://api.twitch.tv/kraken/',
headers: {
'Client-ID': 'CLIENT ID HERE',
Accept: 'Accept: application/vnd.twitchtv.v5+json'
},
json: true
});
@AlcaDesign
AlcaDesign / StarPatterns.pde
Last active February 2, 2017 01:41
Direct Processing conversion of adalberth's p5.js version: https://gist.github.com/adalberth/b204be0e599e89c6d5357b4546c1b086
float sliderA, sliderB;
float dim = 20;
void setup() {
size(600, 600);
sliderA = random(0, dim);
sliderB = random(0, dim * 2);
}
void draw() {
PVector[] points;
int pointCount = 0;
int lastPointCount = 0;
void setup() {
size(600, 600, P3D);
colorMode(HSB);
}
void draw() {
@AlcaDesign
AlcaDesign / DistToSegment_sketch.pde
Last active January 22, 2017 12:28
Animation to show how a distance of a point to a line segment looks. Ref: http://stackoverflow.com/a/1501725
PVector lineStart, lineEnd, point;
void setup() {
size(600, 600);
updatePoints();
}
void draw() {
background(0);
@AlcaDesign
AlcaDesign / DOMAugmentedCanvas-p5-ES2015.html
Last active January 22, 2017 00:43
DOM Augmented Canvas with P5.js
<!doctype html>
<html>
<head>
<title>DOM Augmented Canvas - ES2015</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.6/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.6/addons/p5.dom.min.js"></script>
<style>
html,
body {
margin: 0;
@AlcaDesign
AlcaDesign / Entity.java
Created January 7, 2017 23:40
[Processing] Particle thing
class Entity {
PVector size = new PVector(entitySize, entitySize);
PVector pos = new PVector(0, 0);
PVector vel = new PVector(0, 0);
PVector acc = new PVector(0, 0);
color c;
boolean bounced = false;
int life = 0;
int lifeSpan = 200;
// Ascii colors in console
function colorize(id, ...text) {
return `\u001b[${id}m${text.join()}\u001b[39m`;
}
// The brightest white text
function whiteBright(...text) {
return colorize(97, ...text);
}
// The brightest white text
function blackBright(...text) {
'use strict';
const _ = require('lodash'), // Just to handle a couple of things more easily
tmi = require('tmi.js'),
channel = ''; // Your channel
let mainConfig = {
options: {
debug: true // Debug to console