Skip to content

Instantly share code, notes, and snippets.

View webia1's full-sized avatar
🍀
I will always be polite to you, even if you're not; you can at most be blocked.

Webia1 webia1

🍀
I will always be polite to you, even if you're not; you can at most be blocked.
  • Milky Way
View GitHub Profile
@webia1
webia1 / CouchDB_Python.md
Created November 12, 2020 19:25 — forked from marians/CouchDB_Python.md
The missing Python couchdb tutorial

This is an unofficial manual for the couchdb Python module I wish I had had.

Installation

pip install couchdb

Importing the module

@webia1
webia1 / introrx.md
Created November 7, 2020 16:42 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@webia1
webia1 / csv.pegjs
Created July 26, 2020 15:23 — forked from trevordixon/csv.pegjs
Javascript CSV Parser generated by PEG.js
{
var separator = ',';
}
start
= comma
comma
= & { return separator = ','; } sv:sv { return sv; }
@webia1
webia1 / Observable_in_vanillaJS.md
Created December 15, 2019 19:26 — forked from ltciro/Observable_in_vanillaJS.md
simulate pattern observable in vanilla JS

Rxjs

const next = (message)=> console.log("First observer message: " + message);
const error = (error) => console.log("Second observer error: " + error);
const complete = () => console.log("complete");

const next1 = (message)=> console.log("First observer message 1: " + message);
const error1 = (error) => console.log("Second observer error 1: " + error);
const complete1 = () => console.log("complete 1");
@webia1
webia1 / README.md
Created July 20, 2018 17:05 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
  • List every object at each commit.
@webia1
webia1 / post.md
Created May 19, 2018 10:54 — forked from simonexmachina/post.md
JavaScript and Object Models

JavaScript and Object Models

A "choose your own adventure" story

JavaScript is has both object-oriented and functional heritage, thanks to its two parents: Scheme and Self.

It provides first class functions and makes it simple to compose these function objects into bundles of awesome. Even though I'm an OO "true believer" at heart, I find myself composing my code using functional concepts, and use the OO approach where there's a clear benefit or where I feel that it's the best way to communicate the interface.

Object-oriented software design is by no means the only way to do software design, but it's been an immensely successful model for a very long time now, and provides a clear and well-understood mental model for thinking and communicating about software. Lots of good ideas like encapsulation, delegation, traits and composition fit well into OO design.

@webia1
webia1 / fp-lingo.md
Created February 4, 2018 08:56 — 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) {
@webia1
webia1 / angular_data.html
Created December 7, 2015 10:50 — forked from MrSaints/angular_data.html
A simple AngularJS application to add / delete / list / sort data comprising of three fields (state code, price and tax). It was written to demonstrate to a friend, the simplicity and power of Angular to address programming challenges - in recruitment processes - quickly and effectively.
<!DOCTYPE html>
<html ng-app>
<head>
<title>Add / List Data (AngularJS)</title>
<style>
.list_data { margin-bottom: 2rem }
table, th, td { border: 1px solid #AAA }
th { cursor: pointer }
</style>
</head>