I no longer mantain this list. There are lots of other very comprehensive JavaScript link lists out there. Please see those, instead (Google "awesome JavaScript" for a start).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Least Frequently Used (LFU) is a caching algorithm in which the least frequently used cache block is removed whenever the cache is overflowed. | |
* In LFU we check the old page as well as the frequency of that page and if the frequency of the page is larger than the old page we cannot remove it | |
* and if all the old pages are having same frequency then take last i.e FIFO method for that and remove that page. | |
*/ | |
include_once '../../runner.php'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This gist shows how to run asyncio loop in a separate thread. | |
It could be useful if you want to mix sync and async code together. | |
Python 3.7+ | |
""" | |
import asyncio | |
from datetime import datetime | |
from threading import Thread | |
from typing import Tuple, List, Iterable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
var version = 'v2.0.24:'; | |
var offlineFundamentals = [ | |
'/', | |
'/offline/' | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function ComponentWithMixins( ...mixins) { | |
class MixedComponent extends React.Component { } | |
for( let mixin of mixins) { | |
// TODO: Would need to handle mixin collisions... | |
for( let name of Object.keys( mixin)) { | |
MixedComponent.prototype[ name]= mixin[ name] | |
} | |
} |
co@3:
1 middleware
9457.52
5 middleware
9360.21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function whatDoesItDo(val){ | |
return val ? 1 : 2; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* backbone-promises returns ES6 Promises for Backbone.sync operations. | |
* @return {Object} monkey-patched Backbone. | |
* | |
*/ | |
define(['backbone-lib', 'es6-promise'], function(Backbone, Promise){ | |
// Backbone.ajax to return native ES6 promises for ajax calls insead of jQuery.Deferreds | |
Backbone.origAjax = Backbone.ajax; | |
Backbone.ajax = function ajax(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sync: function (method, model, options) { | |
Backbone.sync.call(method, model, options); | |
} | |
//from http://stackoverflow.com/a/18839219/1377866 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
пер ДуховноеЛицо = действо(признак) { | |
сие._признак = признак; | |
}; | |
ДуховноеЛицо.прообраз.помолиться = действо(молитва) { | |
паства.внемли(молитва + "\пАминь!"); | |
}; | |
пер Диакон = действо(признак) { | |
ДуховноеЛицо.вызвать(сие, признак); | |
сие.сан = "диакон"; |
NewerOlder