Skip to content

Instantly share code, notes, and snippets.

View MartinRGB's full-sized avatar
🎯
Focusing

MartinRGB MartinRGB

🎯
Focusing
View GitHub Profile
@oaluna
oaluna / index.html
Created December 8, 2020 18:43
Stripe Website Gradient Animation
<html>
<head>
<title>Stripe Gradient</title>
</head>
<body>
<canvas id="gradient-canvas" data-js-darken-top data-transition-in>
<!--
Remove data-js-darken-top to keep the same brightness in the upper part of the canvas
-->
</canvas>
@jjsquady
jjsquady / nextjs-deploy.md
Last active April 25, 2024 20:49
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active April 26, 2024 03:07
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@nickbutcher
nickbutcher / MainActivity.java
Last active August 20, 2021 16:15
A quick sample of the new physics-based animation library added in Support Library 25.3.0 docs: https://developer.android.com/reference/android/support/animation/package-summary.html output: https://twitter.com/crafty/status/842055117323026432
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
anonymous
anonymous / colour_ring.pde
Created May 19, 2016 15:14
// by davey whyte aka @beesandbombs
void setup(){
size(600,520,P3D);
colorMode(HSB,1);
noStroke();
}
float R = 160, r = 55;
int N = 720;
@bellbind
bellbind / app.html
Created May 20, 2015 07:23
[electron]Use electron as a Web Server
<!doctype html>
<html><head><script src="app.js"></script></head><body></body></html>
// by d whyte
int[][] result;
float t;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 25, 2024 12:16
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@koenbok
koenbok / qc-framer.js
Created May 14, 2014 15:04
QC Spring Value Converter
var QcValueConverter = {
tensionFromQcValue: function(qcValue) {
return (qcValue - 30.0) * 3.62 + 194.0;
},
qcValueFromTension: function(tension) {
return (tension - 194.0) / 3.62 + 30.0;
},
frictionFromQcValue: function(qcValue) {
@marekhrabe
marekhrabe / generator-plugin.js
Last active March 8, 2017 06:46
Using Photoshop generator plugin together with HTML panel. Pseudo-untested-code
exports.init = function (generator, config) {
var io = require('socket.io').listen(1234); // put your unique port here
io.sockets.on('connection', function (socket) {
socket.emit('message', 'i am ready');
socket.on('doStuff', function (data) {
generator.getDocumentInfo().then(function (document) {
socket.emit('message', 'working with document…');
}, function (err) {
console.log(err);