Skip to content

Instantly share code, notes, and snippets.

View message's full-sized avatar
♥️

Dmitry Polovka message

♥️
View GitHub Profile
@message
message / gist:5346478
Created April 9, 2013 15:08
PHP Config
[17:54 @ ~/Dropbox/Work] $ php-config
Usage: /usr/local/bin/php-config [OPTION]
Options:
--prefix [/usr/local/Cellar/php53/5.3.22]
--includes [-I/usr/local/Cellar/php53/5.3.22/include/php -I/usr/local/Cellar/php53/5.3.22/include/php/main -I/usr/local/Cellar/php53/5.3.22/include/php/TSRM -I/usr/local/Cellar/php53/5.3.22/include/php/Zend -I/usr/local/Cellar/php53/5.3.22/include/php/ext -I/usr/local/Cellar/php53/5.3.22/include/php/ext/date/lib]
--ldflags [ -L/usr/local/opt/zlib/lib -L/usr/local/opt/jpeg/lib -L/usr/local/opt/libpng/lib -L/usr/local/opt/freetype/lib -L/usr/local/opt/gettext/lib -L/usr/local/lib -L/usr/local/Cellar/postgresql/9.2.3/lib]
--libs [ -lz -lexslt -lresolv -ledit -lncurses -lpq -lpq -liodbc -lldap -llber -liconv -liconv -lintl -lfreetype -lpng -lz -ljpeg -lcrypto -lssl -lcrypto -lcurl -lbz2 -lz -lcrypto -lssl -lcrypto -lm -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lxml2 -liodbc -liodbc -lxml2 -lnetsnmp -lcrypto -lxml2 -lx
var directionsDisplay = new google.maps.DirectionsRenderer();
var directionsService = new google.maps.DirectionsService();
directionsDisplay.setMap(wiid7.getAttrs().gmap);
waypts = [
// ЮРКАЛНСКИЙ ОБРЫВИСТЫЙ БЕРЕГ
{
location: "57.016254,21.383171",
stopover: true
@message
message / throttle
Created April 29, 2015 13:40
throttle
[4:20:11 PM] Dmitry Polovka: what's the purpose of debouncer/throttle? Just to debounce single function for ...ms, and if you will debounce same func twice, it will be called twice?
Or for example if
function x is debounced for 500ms
after 200ms... function x is debounced for 500ms once again
it will be called once after 500ms, and will not be added as second function call?
[4:32:55 PM] @Касперский: There are two strategies for debounce and throttle, but what common is that original function will never be called more than once in X ms no matter how many times you call throttle / debounced function.
Throttle:
! function(e) {
"use strict";
var t = function(e) {
var t = function(e, t, n) {
n = "function" == typeof n ? n() : null === n ? "" : void 0 === n ? "" : n, e[e.length] = encodeURIComponent(t) + "=" + encodeURIComponent(n)
},
n = function(e, o, s) {
var r, i, a;
if ("[object Array]" === Object.prototype.toString.call(o))
for (r = 0, i = o.length; i > r; r++) n(e + "[" + ("object" == typeof o[r] ? r : "") + "]", o[r], s);