Skip to content

Instantly share code, notes, and snippets.

View jcramirez's full-sized avatar

Juan jcramirez

View GitHub Profile
# Project Title
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
A nice project with a nice description
---
## Requirements
For development, you will only need Node.js and a node global package, installed in your environment.
@jcramirez
jcramirez / promiseRecursion.js
Created October 3, 2017 19:00
sample of how to do recursion using a promises
/**
* @param {Integer} devs
* @param {Array} elem
*/
let getSequences = (devs, elem) => {
return new Promise((resolve, reject) => {
if (devs === 0) {
resolve(elem)
return
}
@jcramirez
jcramirez / preventMustachesVue.txt
Last active September 13, 2017 17:06
Prevent showing mustaches before Vue.js is ready
// css
[v-cloak] {
display: none;
}
// html
<div v-cloak>
{{ message }}
</div>
@jcramirez
jcramirez / 0_reuse_code.js
Created July 26, 2016 06:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jcramirez
jcramirez / hexTools.py
Created July 31, 2013 23:32
A class I wrote as an utility when dealing with byte data. It can create bytes out of nibbles, words out of bytes and break words into a byte lists. All inputs are validated and the exceptions are raised.
class HexTools():
"""
Performs simple operations on byte or word data
"""
MAX_VALUE_FOR_BYTE = 0xFF
MAX_VALUE_FOR_WORD = 0xFFFF
MAX_VALUE_FOR_NIBBLE = 0x0F
@staticmethod
def getHighNibbleFromByte(byte=0):