Skip to content

Instantly share code, notes, and snippets.

View glebec's full-sized avatar
🥃
Slàinte

Gabriel Lebec glebec

🥃
Slàinte
View GitHub Profile
@friedbrice
friedbrice / Maps.java
Last active August 14, 2019 18:34
A specification for maps (the abstract data type) as a free category. And a short demo of property testing. (JSVerify source available at https://github.com/jsverify/jsverify)
package local.maps;
import java.util.Optional;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
import org.scalacheck.Arbitrary;
import org.scalacheck.Gen;
import org.scalacheck.Prop;

The Cabal/Stack Disambiguation Guide

One of the most frequently asked Haskell beginner questions in recent years is:

"Stack or cabal?"

I will helpfully not answer this question. Instead I will hope to eliminate the confusion that many of the askers seem to have about the various different

@collin
collin / 1-vimsetup.md
Last active August 4, 2017 17:47
Collin's vim setup

I use neovim, which is mostly compatible with all vim plugins and apis.

vim-pathogen loads my plugins

I use a few plugins to give me a better editing/navigation experience.

  • ctrlp.vim fuzzy-search to find files in the project by name
  • nerdtree file tree navigator
  • syntastic syntax highlighting and linting
  • vim-better-whitespace cleans up whitespace as I save files
@queerviolet
queerviolet / .gitignore
Last active January 18, 2018 17:32
A little calculator
node_modules
@odedw
odedw / .eslintrc.yaml
Last active March 8, 2022 05:27 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
# http:#eslint.org/docs/rules/
ecmaFeatures:
binaryLiterals: false # enable binary literals
blockBindings: false # enable let and const (aka block bindings)
defaultParams: false # enable default function parameters
forOf: false # enable for-of loops
generators: false # enable generators
objectLiteralComputedProperties: false # enable computed object literal property names
objectLiteralDuplicateProperties: false # enable duplicate object literal properties in strict mode
objectLiteralShorthandMethods: false # enable object literal shorthand methods
@Avaq
Avaq / combinators.js
Last active May 1, 2024 09:38
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 S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@cletusw
cletusw / .eslintrc
Last active February 29, 2024 20:24
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
var onError = function (err) {
gutil.beep();
console.log(err);
};
gulp.task('styles', function () {
gulp.src('scss/style.scss')
.pipe(plumber(onError)
.pipe(rubysass())
.pipe(gulp.dest('dist/'));
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #