Markdown és un llenguatge de marcat lleuger per donar format simple a textos.
- Estàndard (més o menys)
- Simple
""" | |
Minimal pyboard.py implementation for communicating with MicroPython boards | |
""" | |
import os | |
import time | |
import re | |
import serial | |
import serial.tools.list_ports |
import { useState, useEffect } from 'react'; | |
export type TimeoutOptions = { | |
initial: number; | |
auto?: boolean; | |
interval?: number; | |
onFinish?: () => void; | |
}; | |
export const useTimeout = (options?: TimeoutOptions) => { |
""" Functional module """ | |
from typing import List, Dict, Callable, TypeVar, Optional | |
T = TypeVar('T') | |
U = TypeVar('U') | |
def map(predicate: Callable[[T], U], items: List[T]) -> List[U]: | |
''' | |
Applies a given function to all items in the list and returns a new list | |
containing the results. |
import os | |
import json | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
from urllib import parse | |
from requests import post | |
port = os.environ['PROXY_PORT'] | |
url = os.environ['FORWARD_URL'] | |
token = os.environ['TOKEN'] |
tap "homebrew/bundle" | |
# BASIC SOFTWARE | |
brew "mas" | |
mas "Slack", id: 803453959 | |
mas "The Unarchiver", id: 425424353 | |
mas "Spark", id: 1176895641 | |
mas "Dropover", id: 1355679052 | |
mas "Bitwarden", id: 1352778147 | |
cask "rectangle" |
import winston from 'winston'; | |
import morgan from 'morgan'; | |
import json from 'morgan-json'; | |
/* WINSTON */ | |
const filterLevel = level => winston.format(info => info.level === level ? info : undefined)(); | |
const logger = winston.createLogger({ | |
levels: { error: 0, warn: 1, info: 2, debug: 3, http: 4 }, | |
transports: [ |
Compile a Processing sketch into a library that can be used with an import. This is helpful to reduce the amount of Processing tabs in a project, specially for that bunch of classes that won't be changed and belong to a same conceptual group.
Translate Processing's .pde
files to .java
files, getting rid of all the Processing core functions by java equivalents (ex. sin()
to Math.sin()
) and/or import Processing classes (ex. PVector
).
Add package name at the beginning of every java class file.
Open Terminal and go to sketch's directory. Type the following command
javac -cp [processing_path]:[extra_libraries] -source 1.6 -target 1.6 -d . *.java