Skip to content

Instantly share code, notes, and snippets.

@chonz0
chonz0 / midi.h
Last active October 2, 2020 15:44
MIDIUSB example
#include <MIDIUSB.h>
int note;
int previous_note = 0;
int current_note = 0;
void noteOn(byte channel, byte pitch, byte velocity) {
midiEventPacket_t noteOn = {0x09, 0x90 | channel, pitch, velocity};
MidiUSB.sendMIDI(noteOn);
}
@chonz0
chonz0 / temas.md
Last active February 14, 2020 15:21
Temas

Temas

  • 👣 Primeros pasos en Git, trabajando colaborativamente
  • 🖌 Introducción a SCSS y algunos casos de uso
  • 🐨 Chau Koala, hola Prepros (Koala with superpowers)
  • 🛣 ES6, el Javascript del futuro (y del presente)
  • 🎨 Estilando Bootstrap, de la manera correcta
  • 🚀 Maquetando una web usando únicamente (ponele) Emmet
  • 🧩 Haciendo el código HTML & JS mantenible a futuro
  • 🕵 Code review y refactorización
@chonz0
chonz0 / Dockerfile
Last active December 11, 2019 18:52
FROM node:10-alpine
WORKDIR /usr/src/app
ENV PORT 8080
ENV HOST 0.0.0.0
COPY package*.json ./
RUN npm install --only=production
@chonz0
chonz0 / diff.md
Last active November 12, 2019 16:02
const Foo = () => {
  if (foobar) {
-   return true;
+   return foobar;
  } else {
    return false;
  }
}
@chonz0
chonz0 / package.json
Created September 18, 2019 12:26
Copy attachments from specific Slack channel
{
"name": "slack",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"fs": "^0.0.1-security",
"glob": "^7.1.4"
}
}
@chonz0
chonz0 / iterm2-solarized.md
Last active August 8, 2019 13:26 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)
FROM php:7.0.4-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql
@chonz0
chonz0 / curl.md
Created November 16, 2018 21:43 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane