Skip to content

Instantly share code, notes, and snippets.

import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'semi': [ 'error', 'always', ],
<!DOCTYPE html>
<html lang="en">
<head>
<title>DEMO</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<style>
* {
import * as fs from "fs";
import * as events from "events";
import * as readline from "readline";
import * as path from "path";
import { fileURLToPath } from "url";
function md_handler(md_directory: string, md_name: string) {
return new Promise((resolve, _) => {
const read_interface = readline.createInterface({
input: fs.createReadStream(path.join(md_directory, md_name)),
@martinsgmx
martinsgmx / prime_number.py
Last active May 16, 2022 04:54
Simple script prime number check!
#!/usr/bin/python3
from os import remove, path
def prime_number(number, file_name):
is_prime = lambda number: all((number % i) != 0 for i in range(2, int( number**.5 ) + 1) )
file = open(f'{file_name}.txt', 'at')
for n in range(2, number):
[[0,0,0,1,0,1,1,1],[0,1,0,0,0,0,0,0],[0,1,0,0,0,1,1,1],[0,1,1,1,1,0,0,0],[0,1,0,0,1,0,0,0],[0,1,0,0,1,0,1,0],[0,1,0,1,1,0,1,0],[0,0,0,0,1,0,0,0],[0,1,1,0,1,1,0,1],[0,0,0,0,1,0,0,0],[1,0,0,1,0,0,1,1],[0,0,1,0,0,0,0,1]]
@martinsgmx
martinsgmx / grain_chain_logic--test.js
Created February 28, 2022 08:35
Logic test from GrainChain io
/*
* @author: Martín Sg.
* @email: martinsgmx(at)pm(dot)me
*
* @encoding: UTF-8
* @tested with: node engine (v14.17.0)
*
*
* logic test from GrainChain
*
// example server response, raw data
const pseudoResponse = [
{
headers: {
status: 202
},
data: [
{
name: 'Simple course',
teacher: 'Elon Musk',
// ____ __ __ __ __ __
// / __ \____ __ __/ /_ / /__ / / / /___ ____/ /__ ___________________ ________
// / / / / __ \/ / / / __ \/ / _ \/ / / / __ \/ __ / _ \/ ___/ ___/ ___/ __ \ / ___/ _ \
// / /_/ / /_/ / /_/ / /_/ / / __/ /_/ / / / / /_/ / __/ / (__ ) /__/ /_/ // / / __/
// /_____/\____/\__,_/_.___/_/\___/\____/_/ /_/\__,_/\___/_/ /____/\___/\____//_/ \___/
// ___ __ _ ____ __
// / | _____/ /_(_) __/___ ______/ /______
// / /| | / ___/ __/ / /_/ __ `/ ___/ __/ ___/
// / ___ |/ / / /_/ / __/ /_/ / /__/ /_(__ )
// /_/ |_/_/ \__/_/_/ \__,_/\___/\__/____/
/*
* @coded by: @martinsgmx_
* @encoding: UTF-8
* @MCU: ESP-8266 (WittyCloud DevBoard)
* @IDE: Arduino IDE 1.8.10 && Visual Studio Code
* @toolchain: https://github.com/esp8266/Arduino ~ version: 2.6.3
* @description:
* simple sketch for NodeMCU 1.0 ESP-12E module, to test RGB led built-in
* controlled with PWM (analogWrite() function) in ArduinoIDE
*/
arc-gtk-theme 20180114-1
autoconf 2.69-4
automake 1.15.1-1
bash 4.4.023-1
binutils 2.30-4
bison 3.0.5-1
bzip2 1.0.6-7
coreutils 8.29-1
crda 4.14-1
cryptsetup 2.0.3-2