Skip to content

Instantly share code, notes, and snippets.

View fmaylinch's full-sized avatar

Ferran Maylinch fmaylinch

View GitHub Profile
REC: millis= 122596 (d=0)bytesread =4000 educacion=2000 ampli=300 despues de calculos --> millis= 122627 (d=31) bytesRead: 4000 media 13 led_inicial=8 leds_a_encender=0 WIFI_SEND --> millis= 122762 (d=135) o
REC: millis= 122786 (d=0)bytesread =4000 educacion=2000 ampli=300 despues de calculos --> millis= 122818 (d=32) bytesRead: 4000 media 16 led_inicial=7 leds_a_encender=1 WIFI_SEND --> millis= 122954 (d=13) o
REC: millis= 122979 (d=0)bytesread =4000 educacion=2000 ampli=300 despues de calculos --> millis= 123134 (d=32) bytesRead: 4000 media 15 led_inicial=7 leds_a_encender=1 WIFI_SEND --> millis= 123146 (d=12) o
REC: millis= 123293 (d=0)bytesread =4000 educacion=2000 ampli=300 despues de calculos --> millis= 123325 (d=32) bytesRead: 4000 media 21 led_inicial=7 leds_a_encender=1 WIFI_SEND --> millis= 123461 (d=136) o
REC: millis= 123485 (d=0)bytesread =4000 educacion=2000 ampli=300 despues de calculos --> millis= 123516 (d=31) bytesRead: 4000 media 1
// Last changes:
// - tokens for Essex County Express
// - updated remote instance
const tokens = [
"+1", 0, 0, -1, -1, -1,
-2, -2, -3, -4,
"💀", "💀", "🧙", "🦑", "🌟",
"🫀", -3 // added after Miskatonic Museum
];
// This code is displays a counter above.
// The code is transpiled with Babel and run with eval().
const { useState } = React; // imports don't work here
function Counter() {
const [count, setCount] = useState(0);
return (
<div style={{margin: 20}}>
fade("#title", "Привет!")
fade("#text1", "Вот " + link("песня", "https://disk.yandex.ru") + " я написал для тебя")
fade("#text2", "Пожалуйста скажи как тебе)")
@fmaylinch
fmaylinch / arkham-horror.js
Last active March 17, 2024 16:40
Arkham Horror for fmaylinch.github.io
let version = "v0.5.12 token color";
$("#main").css({padding: "0.5em"});
//$('#main-button').click();
let tokens = [
'+1',
0, 0, -1, -1, -1, -2, -2,
-3, -4,
"Skull", "Skull", "Cape",
@fmaylinch
fmaylinch / fmaylinch.github.io-code.js
Last active March 3, 2024 23:09
Code to execute in fmaylinch.github.io
$('#main-button').click(); // click the "MAIN" button (scrolls up)
setTimeout(changeTexts, 1000); // run after 1 second (to give time to scrolling)
function changeTexts() {
fade("#title", "Practice coding")
const action = random(["try", "run", "execute", "modify"])
const js = link("JavaScript", "https://developer.mozilla.org/docs/Web/JavaScript")
fade("#text1", "You can " + action + " the " + js + " code below")
const functions = join(["fade", "join", "link", "random"]);
/**
* This is an example of a basic node.js script that performs
* the Client Credentials oAuth2 flow to authenticate against
* the Spotify Accounts.
*
* For more information, read
* https://developer.spotify.com/web-api/authorization-guide/#client_credentials_flow
*/
var request = require('request'); // "Request" library
import java.util.*; // This is necessary to use collections like List, Set, Map
public class Collections {
public static void main(String... args) {
// Wrapper classes ( use them between angle brackets < > )
// Integer, Double, Boolean
// Long, Character, Float
import java.util.*;
public class Example {
// TODO: Exercise:
// Write a function that given a list of words and a number n, returns list of the words longer than n.
public static void main(String[] args) {
List<String> words;
package tech.bts.javaexamples;
/**
* Basic exercises to practice variable declarations and assignments.
*/
public class BasicsExercises {
public static void main(String[] args) {
/*