Skip to content

Instantly share code, notes, and snippets.

View richardegil's full-sized avatar

Richard Gil richardegil

View GitHub Profile
@eupston
eupston / .html
Created May 9, 2023 15:09
morphing particle effect
<!DOCTYPE html>
<html>
<head>
<title>Three.js Morph</title>
<style>
body { margin: 0; }
canvas { display: block; }
</style>
</head>
<body>
@eupston
eupston / portal_shader.html
Created March 19, 2023 02:22
ChatGPT Portal WebGL Shader
<!DOCTYPE html>
<html>
<head>
<style>
canvas { touch-action-delay: none; touch-action: none; }
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<script>
@cassidoo
cassidoo / base-css.md
Created May 4, 2022 06:37
Base CSS for a plain HTML document

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
 line-height: 1.5rem;
@ursooperduper
ursooperduper / vscode_processing_hype_setup.md
Last active October 31, 2022 17:31
Setting up your Processing + HYPE project in VS Code

Setting up your Processing + HYPE project in VS Code

Mac

Install & configure Processing

  1. First download and install Processing. Once it's installed run it!
  2. In Processing, go to the Tools menu and click "Install processing-java". This will add processing-java to your $PATH. To test this works, open your Terminal.app and type processing-java on the command line. You should see a block of text showing processing commands and options. If you see that, go to the next step.
  3. With Processing open, verify where Processing is looking for your sketches. Open Preferences (⌘ + ,) in Processing and at the top of the dialog, you'll Sketchbook location. This is where Processing expects to find all your Sketches. It's also where your Libraries for Processing are added. So change the location if you need to, but otherwise, remember this path!

Download HYPE

anonymous
anonymous / sphere.pde
Created May 15, 2017 23:58
sphere worms
// by davey aka bees & bombs :)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@addyosmani
addyosmani / flexbox-layout.css
Created January 29, 2017 19:31
Flexbox layout helper classes
/*
Flexbox CSS helpers from the Polymer team. Extracted from https://github.com/PolymerElements/iron-flex-layout for use as just CSS.
Docs: https://elements.polymer-project.org/guides/flex-layout
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
@shiffman
shiffman / recordinglist.md
Last active September 13, 2019 15:53
A list of ideas for #CodingRainbow Video topics: https://www.youtube.com/user/shiffman
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int led = 12;
int button = 2;
int value = 0;
void setup() {
@laracasts
laracasts / gulpfile.js
Last active February 10, 2024 10:57
Example Laravel-specific Gulpfile from Laracasts.com
var gulp = require('gulp');
var gutil = require('gulp-util');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css')
var coffee = require('gulp-coffee');
var exec = require('child_process').exec;
var sys = require('sys');
@tammyhart
tammyhart / tooltip.js
Last active December 27, 2015 19:39
Super easy tooltips. example html: <a href="#" class="tooltip" title="title here">Link Text</a> In CSS, set .tooltip to relative postion, and .title to absolute position, with whatever styling you want such as background and padding.
function onHoverToggleTooltip( e ) {
var $this = $( this ),
title = $this.attr( 'title' ),
type = e.type,
offset = $this.offset(),
xOffset = e.pageX - offset.left + 10,
yOffset = e.pageY - offset.top + 30;
if( type == 'mouseenter' ) {
$this.data( 'tipText', title ).removeAttr( 'title' );