Skip to content

Instantly share code, notes, and snippets.

View kutyel's full-sized avatar
🌊
数学者に俺は成る!

Flavio Corpa kutyel

🌊
数学者に俺は成る!
View GitHub Profile
@robinpokorny
robinpokorny / 1-info.md
Last active January 17, 2017 13:43
📢 Dead simple tweetable JavaScript Emitter pattern module using Map (ES2015)
@aarongarciah
aarongarciah / sass-mixins.md
Last active August 17, 2017 08:34
Some useful Sass mixins

###Fluid properties (via)

@mixin fp($property, $min, $max, $start: 320, $end: breakpoint('desktop'), $clip: true, $clipAtStart: true, $clipAtEnd: true) {
	$start: $start / ($start * 0 + 1);
	$end: $end / ($end * 0 + 1);
	$multiplier: ($max - $min) / ($end - $start) * 100;
	$adder: ($min * $end - $max * $start) / ($end - $start);
	$formula: calc(#{$multiplier + 0vw} + #{$adder + 0px});
	@if $clip and $clipAtStart {
		@media (max-width: #{$start + 0px}) {
@kutyel
kutyel / .editorconfig
Last active November 17, 2017 10:30
Fla's favourite setup!
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@kutyel
kutyel / unfollow.fp.js
Created December 19, 2017 13:48
Twitter Unfollow Bot
'use strict'
require('now-env')
const Twit = require('twit')
const Task = require('data.task')
const Maybe = require('data.maybe')
const bot = new Twit({
consumer_key: process.env.CONSUMER_KEY,
consumer_secret: process.env.CONSUMER_SECRET,
access_token: process.env.ACCESS_TOKEN,
@kutyel
kutyel / loc.sh
Last active May 9, 2019 10:22
Count lines of JS code in a repo
git ls-files | grep \\.js$ | xargs wc -l
@kutyel
kutyel / fp.js
Last active July 17, 2019 17:13
Flavio's functional programming test
/*
* Implement the following classic FP functions using
* _only_ Array.prototype.{reduce|reduceRight}(). 🤓
*/
const filter = f => xs => xs
const map = f => xs => xs
const every = f => xs => xs
@kutyel
kutyel / curry.js
Last active August 5, 2019 20:51
My own implementation of curry 🍛
// Ultimate version
const curry = (f, ...args) =>
f.length <= args.length
? f(...args)
: x => curry(f, ...args, x)
@kutyel
kutyel / .babelrc
Created August 7, 2019 10:23
Personal JS options 😉🚀
{
"presets": [
"@babel/preset-react",
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"last 2 versions",
"ie >= 11"
module GoogleChart exposing (..)
import Html exposing (Html)
import Html.Attributes as HtmlA
import Json.Encode as E
import List.Extra as List
import Chart exposing (..)
colors =