Skip to content

Instantly share code, notes, and snippets.

@usm4n
usm4n / *valoo.md
Created July 7, 2018 10:53 — forked from developit/*valoo.md
🐻 Valoo: just the bare necessities of state management. 150b / 120b. https://npm.im/valoo

🐻 valoo

just the bare necessities of state management.

Usage

Hotlink it from https://unpkg.com/valoo.

See Interactive Codepen Demo.

@usm4n
usm4n / fp-lingo.md
Created April 8, 2018 13:27 — forked from ericelliott/fp-lingo.md
A Guide to Functional Programming Lingo for JavaScripters

A Guide to Functional Programming Lingo for JavaScripters

Functional programming gets a bad wrap about being too hard for mere mortals to comprehend. This is nonsense. The concepts are actually quite simple to grasp.

The jargon is the hardest part. A lot of that vocabulary comes from a specialized field of mathematical study called category theory (with a liberal sprinkling of type theory and abstract algebra). This sounds a lot scarier than it is. You can do this!

All examples using ES6 syntax. wrap (foo) => bar means:

function wrap (foo) {
@usm4n
usm4n / combinators.js
Created February 21, 2018 05:07 — forked from Avaq/combinators.js
Common combinators in JavaScript
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));
@usm4n
usm4n / destructuring.md
Created December 19, 2017 14:33 — forked from yang-wei/destructuring.md
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@usm4n
usm4n / solarized.less
Created March 5, 2015 18:11
A Solarized Light Theme for Bootstrap 3
//
// Variables
// --------------------------------------------------
@base03: #002b36;
@base02: #073642;
@base01: #586e75;
@base00: #657b83;
@base0: #839496;
@base1: #93a1a1;
#!/bin/bash
# simple vagrant provisioning script
# installs : apache2, php 5.4 and mysql-server and client
# installs : laravel in /vagrant shared folder
# some coloring in outputs.
COLOR="\033[;35m"
COLOR_RST="\033[0m"
body {
background-color: #232323;
color: #555;
padding: 5px;
}
.main {
background-color: #008CBA;
border: 1px solid #eee;
border-radius: 3px;
}
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Responsive Blog Layout</title>
<link rel="stylesheet" href="./assets/css/foundation.css">
<link rel="stylesheet" type="text/css" href="./assets/css/custom.css">
<script src="./assets/js/vendor/custom.modernizr.js"></script>
@usm4n
usm4n / gist:7839211
Created December 7, 2013 09:56
drop down css
#fill_nav{
position: relative;
background-image: url(images/nav_search_fill.png);
background-position: top left;
background-attachment: scroll;
background-repeat: repeat-x;
height:inherit;
width:470px;
margin-left: 15px;
padding:1px;
@usm4n
usm4n / gist:7839195
Created December 7, 2013 09:53
Drop Down Menu
<div id="fill_nav">
<ul class="menu">
<li><a href="#">link1</a></li>
<li><a href="#">link2</a></li>
<li><a href="#">link3</a></li>
<li><a href="#">link4</a>
<ul class="sub_menu">
<li><a href="#">link5</a></li>
<li><a href="#">link5</a></li>
<li><a href="#">link5</a></li>