Skip to content

Instantly share code, notes, and snippets.

View nombrekeff's full-sized avatar
🤘
Working on Cardboard

Manolo Edge nombrekeff

🤘
Working on Cardboard
View GitHub Profile
@nombrekeff
nombrekeff / test.js
Last active June 29, 2019 05:48
selenium-webdriver .setPreference is not a function
const { Builder } = require('selenium-webdriver'); // Currently using ^3.6.0
const firefox = require('selenium-webdriver/firefox'); // Currently using ^3.6.0
// Create a builder for browser 'firefox'
let builder = new Builder().forBrowser('firefox');
// I then create firefox options
let options = new firefox.Options();
// setPreference is present in the docs as well as the type file for this version
@nombrekeff
nombrekeff / flatten-object.js
Last active December 8, 2019 10:53
Get all path from an object
/**
* returns an array containing all paths to a value other than an object
* @param {object} obj
*/
function flattenObject(obj) {
if (typeof obj !== 'object') {
return [];
}
@nombrekeff
nombrekeff / p5-levy-c-curve.js
Created January 5, 2019 23:58
Lévy C Curve Algorithm (In P5.js)
let x;
let y;
let len;
let alpha_angle;
let iteration_n;
let B;
let G;
function toRadians(degrees) {
return degrees * (PI / 180);
let scaled = "0.24372638";
let e = parseInt(scaled);
let d3 = padStart((parseInt((scaled * Math.pow(10, 3)).toString()) % Math.pow(10, 3)).toString(), 3);
let i5 = padStart((parseInt((scaled * Math.pow(10, 8)).toString()) % Math.pow(10, 5)).toString(), 5);
let scaled_ = {
significant: e + '.' + d3, // 0.243
insignificant: i5 // 72638
};
@nombrekeff
nombrekeff / ralf_markdown.md
Last active November 26, 2017 13:34
Documentation for RALLF markdown, markdown to style your task's description

logo RALLF Markdown

Simple markdown to style your tasks description

Available Markdown

**bold** _italic_ `code` [text](url)
Renders As bold italic code link

Available Headers

@nombrekeff
nombrekeff / stml-example.md
Last active January 4, 2017 22:21
stml-example
div#target(.bold .row)[click="doX()"]
  div(.col-4)
    span "Heyy"
  div(.col-6)
    span "You like stones?"