Skip to content

Instantly share code, notes, and snippets.

View dumconstantin's full-sized avatar

Constantin Dumitrescu dumconstantin

  • Bucharest, Romania
View GitHub Profile
var anim = {
// Temporary cue of animations
anims : [],
// Stored cue of animations for looping
store: [],
// Register a temporary animation
register : function(obj, anim, dur, out) {
this.anims.push([obj, anim, dur, out]);
declare var R: R.Static;
declare module R {
/**
* A special placeholder value used to specify "gaps" within curried functions,
* allowing partial application of any combination of arguments, regardless of their positions.
*/
declare class placeholder {}
/**
* Based on
* https://github.com/donnut/typescript-ramda
* with the help of the typescript-converter from
* git@github.com:ptmt/flow-declarations.git
*/
declare module 'ramda' {
declare type placeholder = {}
declare type ListIterator<T, TResult> = {
(value: T, index: number, list: T[]): TResult;
window.schema = {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ui": {
"type": "object",
"properties": {
"input": {
"type": "string"
},
{"current_info":{"hour":"now","hour_name":"Ora curenta","county_id":"42","county_name":"MUNICIPIUL BUCURE\u015eTI","county_code":"B","csv":"votes_now.csv"},"table":[{"id":"17365","precinct_nr":1,"precinct_name":"LICEUL TEORETIC 'NICOLAE IORGA'","county_id":"42","county_name":"MUNICIPIUL BUCURE\u015eTI","county_code":"B","locality_id":"9910","locality":"BUCURE\u015eTI SECTORUL 1","medium":"U","siruta":"179141","initial_count":1351,"LP":581,"LC":0,"LS":8,"UM":0,"LT":589,"presence":43.5973,"Barbati 18-24":8,"Barbati 25-34":20,"Barbati 35-44":56,"Barbati 45-64":90,"Barbati 65+":101,"Femei 18-24":8,"Femei 25-34":25,"Femei 35-44":48,"Femei 45-64":97,"Femei 65+":136},{"id":"17366","precinct_nr":10,"precinct_name":"\u015eCOALA GIMNAZIAL\u0102 NR.13","county_id":"42","county_name":"MUNICIPIUL BUCURE\u015eTI","county_code":"B","locality_id":"9910","locality":"BUCURE\u015eTI SECTORUL 1","medium":"U","siruta":"179141","initial_count":1509,"LP":540,"LC":0,"LS":1,"UM":54,"LT":595,"presence":39.4301,"Barbati 18-24":16,"Barb
@dumconstantin
dumconstantin / helpers.js
Created June 24, 2016 22:35
Helpers for TodoMVC
(function () {
let helpers = {}
helpers.log = R.curry((msg, x) => {
console.log(msg, x)
return x
})
window.helpers = helpers
@dumconstantin
dumconstantin / Main.purs
Last active July 26, 2016 10:49
For medium article
module Main (result) where
import Prelude ((+), (<$>), (<*>))
import Data.Maybe
add x y = x + y
result = add <$> Just 1 <*> Just 2
var PS = {};
// ....
(function(exports) {
var Data_Maybe = PS["Data.Maybe"];
var Control_Apply = PS["Control.Apply"];
var Data_Functor = PS["Data.Functor"];
var add = function (x) {
return function (y) {
@dumconstantin
dumconstantin / Imports.js
Last active July 26, 2016 08:23
For Medium article
(function(exports) {
var Functor = function (map) {
this.map = map;
};
var map = function (dict) {
return dict.map;
};
exports["Functor"] = Functor;
exports["map"] = map;
})(PS["Data.Functor"] = PS["Data.Functor"] || {});
const webpack = require('webpack')
const Config = require('webpack-config').Config
const HtmlWebpackPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const exclude = /node_modules/
console.log('NODE_ENV', process.env.NODE_ENV)
const tailwindConfig = require('./tailwind.js')