Skip to content

Instantly share code, notes, and snippets.

View rlamana's full-sized avatar

Ramón Lamana rlamana

View GitHub Profile
@rlamana
rlamana / okteto-frontend-exercise.md
Last active March 7, 2022 09:30
Okteto Frontend Exercise

Okteto Frontend Offline Exercise

Thank you for your interest in joining our team!

As part of our process we propose this exercise, to be completed in a week. While you are working on it, don’t hesitate to contact Ramon Lamana via e-mail ([email protected]) if you have any questions or suggestions about the exercise.

We have prepared an application with a basic structure to help you get going. You can clone the repository privately (https://github.com/okteto/filemanager) and share your code with us via Github.

@rlamana
rlamana / client.js
Last active November 4, 2018 00:37
webpack-hot-middleware client.js to support port option
/*eslint-env browser*/
/*global __resourceQuery __webpack_public_path__*/
var options = {
path: "/__webpack_hmr",
timeout: 20 * 1000,
overlay: true,
reload: false,
log: true,
warn: true,
@rlamana
rlamana / aviator.html
Created May 6, 2016 02:52
Aviator using A-Frame
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Aviator using A-Frame</title>
<meta name="description" content="Hello, World! • A-Frame">
<script src="aframe.js"></script>
</head>
<body>
<script type="text/javascript">
@rlamana
rlamana / command.sh
Created October 20, 2015 21:12
Command/Subcommand Bash Script Template
#!/bin/bash
VERSION="0.1"
DESCRIPTION="Command/Subcommand line script template"
usage() {
echo "Usage: $0 [ subcommand [-c num] ] [-v]" 1>&2; exit 1;
}
subcommand() {
local OPTIND
// Takes string of Note + Octave
// Example:
// var frequency = getFrequency('C3');
var getFrequency = function (note) {
var notes = ['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'],
octave,
keyNumber;
if (note.length === 3) {
@rlamana
rlamana / extract-sf2.sh
Created May 30, 2013 11:30
Convert a SoundFont + MIDI file to a CAF audio file. Based on https://github.com/neonichu/Core-Audio-Samples
#!/bin/sh
#
## Convert a SoundFont + MIDI file to a CAF audio file.
##
## needs:
## fluidsynth, sox (installable via brew)
## afconvert (part of OS X)
#
var extend = Object.getOwnPropertyNames ?
function ecma5extend(obj) {
var proto = obj;
var protos = [];
var result = {};
while (proto) {
protos.push(proto);
proto = Object.getPrototypeOf(proto);
}