Skip to content

Instantly share code, notes, and snippets.

View pateketrueke's full-sized avatar

Alvaro Cabrera Durán pateketrueke

View GitHub Profile
@pateketrueke
pateketrueke / README.md
Created July 9, 2016 23:28
Tarima + Express

Write the following view-script:

src/example.js.hbs.pug

h1 {{value}}

Execute npm start.

Dependencies

  • npm i tarima-cli [engines] -ES

Where [engines] are the following described in the README.

{
  "scripts": {
@pateketrueke
pateketrueke / package.json
Created March 9, 2016 06:15
Disallow empty objects from generated values
{
"dependencies": {
"json-schema-faker": "git+https://github.com/json-schema-faker/json-schema-faker.git#prune-empty-props"
}
}
[
{ "keys": ["ctrl+shift+<"], "command": "focus_side_bar" },
{ "keys": ["ctrl+<"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+pageup"], "command": "next_view" },
{ "keys": ["ctrl+pagedown"], "command": "prev_view" },
{ "keys": ["ctrl+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } }
@pateketrueke
pateketrueke / AWSECommerce.json
Last active June 2, 2016 00:12
JSON-Schema Faker / dereferencing issues / see #28 #80
{
"id": "http://webservices.amazon.com/AWSECommerceService/2013-08-01#",
"definitions": {
"ItemLookupRequest": {
"type": "object",
"title": "ItemLookupRequest",
"properties": {
"condition": {
"title": "condition",
"allOf": [{
function nvm
bash -c 'source ~/.nvm/nvm.sh; nvm "$@"' nvm $argv
set -l node_dir "$HOME/.nvm/versions/node"
switch (echo $argv[1])
case install
case use
set -l node_version (ls $node_dir | grep $argv[2])
set -l node_version (echo $node_version | cut -d " " -f1)
function my_prompt_git
__fish_git_prompt | sed -e "s| ||g"
end
function my_prompt_pwd
echo $PWD | sed -e "s|^$HOME|~|" -e "s|.*/||g"
end
function fish_prompt --description 'Write out the prompt'
@pateketrueke
pateketrueke / KeyPad.control.js
Created June 11, 2015 03:27
Custom build for ReLoop KeyPad on BitWig
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
/* global loadAPI, sendSysex, host */
loadAPI(1);
var RL;
var KeyPad = require('./keypad');
function runTasks(subtasks, callback) {
function next() {
var task = subtasks.shift();
if (!task) {
return callback();
}
task(function (err) {
if (err) {
@pateketrueke
pateketrueke / rhino-shim.js
Last active March 25, 2016 20:11
Timers and XHR for ol' Rhino support
// http://ejohn.org/blog/bringing-the-browser-to-the-server/
// timers, xhr
// The window Object
var window = this;
(function(){
var curLocation = (new java.io.File("./")).toURL();