Skip to content

Instantly share code, notes, and snippets.

View dillinger's full-sized avatar

Dmytro Paniuta dillinger

  • Berlin
View GitHub Profile
@dillinger
dillinger / package.json
Created June 8, 2021 06:43 — forked from jayphelps/package.json
TypeScript output es2015, esm (ES Modules), CJS, UMD, UMD + Min + Gzip. Assumes you install typescript (tsc), rollup, uglifyjs either globally or included as devDependencies
{
"scripts": {
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js",
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz",
}
}
@dillinger
dillinger / q3config.cfg
Last active March 30, 2020 18:48
Q3 Quality config
seta r_mode "-1"
seta r_customwidth "5120"
seta r_customheight "2880"
seta cg_fov "115"
seta cg_gunCorrectFOV "1"
seta cl_renderer "opengl2"
seta r_allowSoftwareGL "0"
seta r_ignoreGLErrors "1"
seta r_smp "1"
seta r_displayrefresh "0"
data =
{"SSResponse":{"xmlns":"http://schema.openbet.com/SiteServer/2.26/SSResponse.xsd",
"children":[
{"event":{"id":"8102364","name":"21:20 Turf Paradise","eventStatusCode":"A","isActive":"true","displayOrder":"0","siteChannels":"P,Q,C,I,M,","eventSortCode":"MTCH","startTime":"2018-03-26T20:20:00Z","rawIsOffCode":"-","classId":"223","typeId":"2064","sportId":"21","liveServChannels":"sEVENT0008102364,","liveServChildrenChannels":"SEVENT0008102364,","categoryId":"21","categoryCode":"HORSE_RACING","categoryName":"Horse Racing","categoryDisplayOrder":"4","className":"Horse Racing - Live","classDisplayOrder":"-50","classSortCode":"HR","classFlagCodes":"UF,LI,","typeName":"Turf Paradise","typeDisplayOrder":"0","typeFlagCodes":"GVA,AVA,INT,","isOpenEvent":"true","isNext24HourEvent":"true","drilldownTagNames":"EVFLAG_AVA,","isAvailable":"true","cashoutAvail":"N",
"children":[
{"market":{"id":"125184590","eventId":"8102364","templateMarketId":"137047","templateMarketName":"Win or Each Way","collectionIds":"4158,","
#user nobody;
worker_processes 1;
#daemon off;
events {
worker_connections 1024;
}
@dillinger
dillinger / springer-free-maths-books.md
Created December 28, 2015 20:37 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@dillinger
dillinger / intro.md
Created October 9, 2015 22:16 — forked from gschema/intro.md
Basic JavaScript MVC Implementation

Basic JavaScript MVC Implementation

Despite being derived from classical MVC pattern JavaScript and the environment it runs in makes Javascript MVC implementation have its own twists. Lets see how typical web MVC functions and then dive into simple, concrete JavaScript MVC implementation.

How Web MVC typically works

Typical server-side MVC implementation has one MVC stack layered behind the singe point of entry. This single point of entry means that all HTTP requests, e.g. http://www.example.com or http://www.example.com/whichever-page/ etc., are routed, by a server configuration, through one point or, to be bold, one file, e.g. index.php.

At that point, there would be an implementation of Front Controller pattern which analyzes HTTP request (URI at first place) and based on it decides which class (Controller) and its method (Action) are to be invoked as a response to the request (method is name for function and member is name for a variable when part of the class/object).