Skip to content

Instantly share code, notes, and snippets.

View piq9117's full-sized avatar
๐Ÿ’€
Nothing good is happening here

piq9117 piq9117

๐Ÿ’€
Nothing good is happening here
View GitHub Profile
@piq9117
piq9117 / HKT.js
Created November 21, 2017 08:55 — forked from hallettj/HKT.js
Concept for emulating higher-kinded types in Flow via type-level functions
/*
* Concept for emulating higher-kinded types using Flow. Instead of passing
* a type that has not been applied to parameters, this pattern passes
* a type-level function that will map a parameter type to the desired
* higher-kinded type applied to the given parameter.
*
* @flow
*/
// type-level function application
@piq9117
piq9117 / Haph.hs
Created January 21, 2018 05:21 — forked from rexim/Haph.hs
{-# LANGUAGE InstanceSigs #-}
module Haph (bfs) where
import qualified Data.Set as Set
import qualified Data.Map as Map
import qualified Data.List.Ordered as O
newtype AdjacencyList v = AdjacencyList (Map.Map v [v])
class Graph g where
@piq9117
piq9117 / postgres-brew.md
Created January 27, 2018 06:48
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@piq9117
piq9117 / postgres-brew.md
Created January 27, 2018 06:48
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@piq9117
piq9117 / combinators.js
Created February 4, 2018 01:29 — 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)));
@piq9117
piq9117 / spacemacs-keybindings
Last active January 26, 2021 07:19 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@piq9117
piq9117 / state.hs
Created July 31, 2018 18:35 — forked from sdiehl/state.hs
State monad implementation + example
import Control.Monad
-------------------------------------------------------------------------------
-- State Monad Implementation
-------------------------------------------------------------------------------
newtype State s a = State { runState :: s -> (a,s) }
instance Monad (State s) where
return a = State $ \s -> (a, s)
@piq9117
piq9117 / ts-quasar-cli.md
Created September 9, 2018 01:34 — forked from snowyu/ts-quasar-cli.md
Add the typescript supports to quasar framework

Note: This guide applies to the project created by quasar-cli.

First install typescript and ts-loaderpackages in your project.

npm i -D typescript ts-loader

Then modified the quasar.conf.js file in your project:

@piq9117
piq9117 / IosevkaConfigGen.hs
Created September 16, 2018 22:06 — forked from mrkgnao/IosevkaConfigGen.hs
Render Iosevka ligatures to Private Use Area glyphs, for Emacs
{-# LANGUAGE RecordWildCards, Arrows #-}
import Numeric
import Data.Char
import Control.Monad
import Data.Monoid ((<>))
import Data.List (nub, sort, reverse)
data RepeatBounds = RB
@piq9117
piq9117 / nativeJavaScript.js
Created September 28, 2018 20:20 — forked from alexhawkins/nativeJavaScript.js
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests