Skip to content

Instantly share code, notes, and snippets.

View russiann's full-sized avatar
🎧
Focusing

Russian Rebouças russiann

🎧
Focusing
  • Digibee
  • Fortaleza, CE
View GitHub Profile
@russiann
russiann / currying.md
Created August 25, 2022 01:54 — forked from donnut/currying.md
TypeScript and currying

TypeScript and currying

In functional programming you often want to apply a function partly. A simple example is a function add. It would be nice if we could use add like:

var res2 = add(1, 3); // => 4

var add10To = add(10);
var res = add10To(5); // => 15
@russiann
russiann / cytoscapeMachine.js
Created June 8, 2021 21:39
Cytoscape Machine
const options = {
guards: {
isValidElement: () => true
}
}
Machine({
id: 'canvas',
initial: 'pendingInstance',
context: {
@russiann
russiann / SketchSystems.spec
Last active June 7, 2021 02:11
Toggle Component
Toggle Component
Active
TOGGLE -> Inactive
Inactive
TOGGLE -> Active
https://www.kabum.com.br/cgi-local/site/produtos/descricao_ofertas.cgi?codigo=69279&gclid=CjwKCAjwk6P2BRAIEiwAfVJ0rDGJzGiihd4AAHTin_hQrRb5WE36N6ieqUtMo1XCkQFuJYq9krO8gBoCa6UQAvD_BwE
https://www.kabum.com.br/cgi-local/site/produtos/descricao_ofertas.cgi?codigo=69279&gclid=CjwKCAjwk6P2BRAIEiwAfVJ0rDGJzGiihd4AAHTin_hQrRb5WE36N6ieqUtMo1XCkQFuJYq9krO8gBoCa6UQAvD_BwE
@russiann
russiann / index.html
Last active May 23, 2020 20:53
State Management
<div id="app"></div>
@russiann
russiann / index.html
Last active May 23, 2020 18:01
Codemirror
<div id="app"></div>
@russiann
russiann / closures.js
Last active May 22, 2020 09:56
FeM - Javasscript Hard Parts Closure Exercises
// Type JavaScript here and click "Run Code" or press Ctrl + s
// console.log('Hello, world!');
// CHALLENGE 1
function createFunction() {
return function() {
console.log("hello");
};
}
@russiann
russiann / app.js
Created August 17, 2018 18:53 — forked from mnsmarcelo/app.js
//referencia do prompt
var bannerInstall;
if ('serviceWorker' in navigator){
navigator.serviceWorker
.register('sw.js')
.then(function () {
console.log('Service worker está registrado!');
});
}
@russiann
russiann / comoSerChatoNowhatsapp.js
Created October 18, 2017 17:34 — forked from callmeloureiro/comoSerChatoNoWhatsapp.js
Como fazer alguém te responder no whatsapp
var counter = 0;
var i = setInterval(function() {
window.InputEvent = window.Event || window.InputEvent;
var d = new Date();
var event = new InputEvent('input', {
bubbles: true
});
var textbox = document.querySelector('#main > footer > div.block-compose > div.input-container > div.pluggable-input.pluggable-input-compose > div.pluggable-input-body.copyable-text.selectable-text');
var textToSend = "Me responde!";
@russiann
russiann / component.js
Created September 21, 2017 02:26
component.js
import $ from 'dom7';
import Template7 from 'template7';
import Utils from '../utils/utils';
const tempDom = document.createElement('div');
class Framework7Component {
constructor(c, extend = {}) {
const context = Utils.extend({}, extend);
const component = Utils.extend(this, c, { context });