Skip to content

Instantly share code, notes, and snippets.

Constantin Dumitrescu dumconstantin

Block or report user

Report or block dumconstantin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View webpack.development.js
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')
@dumconstantin
dumconstantin / Imports.js
Last active Jul 26, 2016
For Medium article
View Imports.js
(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"] || {});
View Main.js
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 / Main.purs
Last active Jul 26, 2016
For medium article
View Main.purs
module Main (result) where
import Prelude ((+), (<$>), (<*>))
import Data.Maybe
add x y = x + y
result = add <$> Just 1 <*> Just 2
@dumconstantin
dumconstantin / helpers.js
Created Jun 24, 2016
Helpers for TodoMVC
View helpers.js
(function () {
let helpers = {}
helpers.log = R.curry((msg, x) => {
console.log(msg, x)
return x
})
window.helpers = helpers
View prezentaVotareBucuresti_5iun2016.json
{"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
View schema.js
window.schema = {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ui": {
"type": "object",
"properties": {
"input": {
"type": "string"
},
View flow-interface-ramda.js
/**
* 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;
View ramda-flow.js
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 {}
View Serialize animations in jQuery
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]);
You can’t perform that action at this time.