Skip to content

Instantly share code, notes, and snippets.

View EugeneN's full-sized avatar
🌎

Eugene EugeneN

🌎
View GitHub Profile

Keybase proof

I hereby claim:

  • I am eugenen on github.
  • I am eugenen (https://keybase.io/eugenen) on keybase.
  • I have a public key ASC1OZRhY5Qa14Vc8yfL9YL_Z87sI5NwSAZ3qO1ts_dp-Qo

To claim this, I am signing this object:

flags: {}
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2
compiler-check: match-exact
setup-info:
ghcjs:
source:
ghcjs-0.2.0.20151230.3_ghc-7.10.2:
url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz"
@EugeneN
EugeneN / BLOGPOST0.adoc
Created February 14, 2016 09:09 — forked from mbbx6spp/BLOGPOST0.adoc
Demonstration of referentially transparent state without the extra client boilerplate from a live coding study session on the FP in Scala book with coworkers. (Chapter 6 in FP in Scala)

Functional State: From Object Oriented Domain Modeling to Functional Programming Algebras

When coming from an object oriented background to functional programming you might be wondering if and/or how functional programming allows for modeling abstractions in our domain and how we go from an abstract model to working code.

Here is my attempt to provide a path so you can update your thought processes to aid in the transition from OO to FP.

OO Domain Model

@EugeneN
EugeneN / ActivitiesView.js.md
Last active February 11, 2019 08:30
ActivitiesView.js

Very small part of G4 as an example of OOP-style web application. Not so bad :-)

```javascript

/ requires generic_view */ (function () { YAHOO.G4.ActivitiesView = function (cont, opts) { YAHOO.G4.ActivitiesView.superclass.constructor.call (this, cont, opts); };

var Dom = YAHOO.util.Dom, Config = YAHOO.util.Config, ActivitiesView = YAHOO.G4.ActivitiesView, Lang = YAHOO.lang, GenericView = YAHOO.G4.GenericView;

ActivitiesView.API_DO_URL = ‘/api/activity/do/’;

ActivitiesView.label_formatter = function (elCell, oRecord, oColumn, oData) { var color = oRecord.getData(‘color’), title = oRecord.getData(‘title’);

elCell.innerHTML = '<span class=\"t-label-dt\">'+title+'</span>';

}

@EugeneN
EugeneN / buildModule.hs
Last active March 7, 2016 04:59
Unix shell scripting in Haskell example
#!/usr/bin/env runhaskell
{-# LANGUAGE OverloadedStrings #-}
import Turtle
import Prelude hiding (FilePath)
import qualified Data.Text as T
import System.Environment (getArgs)
usage = "Please specify module name you would like to build as first argument."
tell application "System Events"
set desktopCount to count of desktops
repeat with desktopNumber from 1 to desktopCount
tell desktop desktopNumber
set picture to "/Library/Desktop Pictures/Beach.jpg"
end tell
end repeat
end tell
@EugeneN
EugeneN / cat-machine-for-c.md
Created July 10, 2014 23:34
cat-machine-for-c.md

CAT MACHINE


^^ do not type above this line ^^^^^^^^^^^^^^^

type here until full satisfaction

@EugeneN
EugeneN / ideas-for-c.md
Created July 10, 2014 22:57
ideas-for-c.md

Ideas for C.MD

  • a tool for reading texts, with private comments on fileds, reminders etc?
  • stack of bookmarks
  • side-notes
  • side-notes as resume with backward navigation
  • words lookup while preserving main context - semitransp. panel or side panel etc
  • automatic reminders on where you stopped
  • popup pie menu on hover and select, add items to lists - to read, define, tree hierarchy, notes etc
  • auto load resources, mark as read, save reading position
@EugeneN
EugeneN / welcome-to-c.md
Last active January 13, 2016 10:07
welcome-to-c.md

Welcome to C.MD

This is an explosive mixture of ClojureScript, Rx, React/Om, core.async, github CORS api, ace, marked, web workers etc craftedengineered together to give you the best gist editing tool, ever... well, at least a good try :-) It's currently an alfa-quality prototype, so do not expect to much.

What you can do next:

  • log in with your Github credentials*
@EugeneN
EugeneN / 0_reuse_code.js
Created July 2, 2014 11:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console