Skip to content

Instantly share code, notes, and snippets.

@animanoir
animanoir / contador_de_segundos.pde
Created March 28, 2022 00:10
Contador de segundos para que pase algo cada x segundo en Processing.
int elapsed = millis() - lastTime;
if (elapsed >= 5000){
image(goodCandy[rand], randX, goodY, randCandyW, randCandyH);
goodY = goodY + (candySpeed * yDirCandy);
lastTime = millis();
}
@animanoir
animanoir / animanoir-notion-randomquote.json
Last active April 19, 2023 19:30
animanoir-notion-randomquote
[
{
"author": "〇",
"content": "Dialogar con otras personas es encontrarte a ti mismo."
},
{
"author": "Oscar Wilde",
"content": "Everything in the world is about sex except sex. Sex is about power."
},
{
@animanoir
animanoir / ntkamp.html
Last active July 5, 2021 22:03
AMP email para PSL Group v1.4 (no validation errors)
<!--
## Introduction
Learn how to create your first AMP email. This sample covers the basic structure of AMP emails.
-->
<!-- -->
<!-- Doctype declaration is required. -->
<!doctype html>
<!-- This tells everyone that this is an AMP email. `<html amp4email>` works too. -->
// Forma elegante de sacar un item al azar de un array desde una función.
Array.prototype.random = function () {
return this[~~(Math.random() * this.length - 1)]
}
version: '3.8'
services:
mysql:
image: mysql:5.7
restart: unless-stopped
ports:
- "3306:3306"
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: csb
NODE_ENV=development gatsby develop
@animanoir
animanoir / tasks.json
Created February 15, 2020 06:07
archivo tasks.json para meter a VSCode y ejecutar Processing desde allí.
// Tasks for processing and p5
// only for Windows
{
"version": "0.1.0",
"command": "cmd",
"isShellCommand": true,
"showOutput": "always",
"args": ["/C"],
"tasks":
[
int w = 500;
int h = 500;
int r, g;
void setup() {
size(500, 555);
noStroke();
background(255);
}
@animanoir
animanoir / centrar-div.css
Last active November 12, 2020 02:14
Center a div
.centrar{
position: absolute;
top: 50%;
left: 50%;
/*El translate hace que el punto de anclaje esté en el centro.*/
transform: translate(-50%, -50%);
}
@animanoir
animanoir / ocultaLikes.css
Created November 27, 2016 19:16
Para ocultar likes y esas pendejadas en Facebook
/* Created by Antonio Ferreiro Ferrero AKA "a3cAnton" 09-05-2012 */
/*Usando Stylish, con el tema FaceBlack de Antonio Ferreiro, + la extensión Hide Likes, se ocultan
casi por completo los "likes" o "reacciones". Poner dentro del "Code 1" en el estilo antes mencionado.*/
@namespace url(http://www.w3.org/1999/xhtml);
._a7s ._524d a,
._a7s ._50u4,
._1ysv ._1g5v ._3t54 ._ipp {
display: none;
pointer-events: none;