Skip to content

Instantly share code, notes, and snippets.

View IsTheJack's full-sized avatar
🇮🇪
Dublin

Roberto Oliveira IsTheJack

🇮🇪
Dublin
View GitHub Profile
@IsTheJack
IsTheJack / Defaut (Windows).sublime-keymap.json
Created March 7, 2016 18:57
My Sublime Text 3 (Windows) configurations
[
{ "keys": ["alt+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
{ "keys": ["alt+down"], "command": "scroll_lines", "args": {"amount": -1.0} },
{ "keys": ["shift+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["shift+alt+down"], "command": "select_lines", "args": {"forward": true} }
]
@IsTheJack
IsTheJack / instalacao_node.txt
Last active March 11, 2016 15:12
Instalação do Ambiente NodeJs
1 - Instala o git (Software de Versionamento)
$ sudo apt-get install git
2 - Instala o NVM (Gerenciador de pacotes pra javascript e node) seguindo os passos da documentação do mesmo no git
https://github.com/creationix/nvm#install-script
3 - Instala as versões atuais do node usando o NVM
$ nvm install 5.8.0
$ nvm install 4.4.0
$ nvm use 5.8.0
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@IsTheJack
IsTheJack / or_and_implementation.js
Last active March 23, 2016 17:41
Implementation of logical operations using funcional programming in Javascript with undescore.js
let AND = (...exp) => _.reduce(exp, (acc, next) => next? acc: next, true);
let OR = (...exp) => _.reduce(exp, (acc, next) => !next? acc: next, false);
console.log(AND (
1 < 2,
2 >= 3,
'apple' == 'apple',
30 == 31
)); // => false
@IsTheJack
IsTheJack / XOR.js
Last active February 16, 2018 21:26
Implementing NOT, AND, NAND, OR, NOR, XOR and XNOR operators in JS with Underscore.js and Babel
'use strict';
let NOT = (arg) => !arg;
let AND = (...args) => _.reduce(args, (acc, next) => next? acc: next, true);
let NAND = _.compose(NOT, AND);
let OR = (...args) => _.reduce(args, (acc, next) => NOT(next)? acc: next, false);
let NOR = _.compose(NOT, OR);
let XOR = (...args) =>
@IsTheJack
IsTheJack / 1-1000.txt
Created April 7, 2016 14:00 — forked from deekayen/1-1000.txt
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that
@IsTheJack
IsTheJack / fp.js
Last active April 26, 2016 17:35
Other functional programming study with Javascript (ES6)
const tail = arr => arr.slice(1 - arr.length);
const head = arr => arr[0];
// Implementing the higher order function foldl or reduce
const foldl = (arr, fn, init) => {
const [x, xs] = [head(arr), tail(arr)];
const [hasInitialValue, arrHasMoreElementsThanOne] = [init !== undefined, arr.length > 1];
const acc = hasInitialValue? fn(init, x): x;
return arrHasMoreElementsThanOne? foldl (xs, fn, acc): acc;
};
@IsTheJack
IsTheJack / pure_javascript_selectors.md
Last active March 1, 2017 18:55
Algumas anotações acerca de seletores em javascript puro

Estudo acerca de seletores em JS puro

A princípio, temos quatro seletores importantes:

document.getElementById(id);
document.getElementsByClassName(className);
document.getElementsByTagName(tagName);
document.getElementsByName(nameAttr);
//led for visualization (use 13 for built-in led)
int speakerPin = 8;
//speaker connected to one of the PWM ports
#define c 261
#define d 294
#define e 329
#define f 349
#define g 391
# Main link!
https://atom.io/packages/sync-settings