Skip to content

Instantly share code, notes, and snippets.

Samuel Liew samliew

Block or report user

Report or block samliew

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 Stack-Experiment-Off.user.js
// ==UserScript==
// @name Stack Experiment Off
// @author CertainPerformance
// @description Turns off the voting experiment - shows true vote totals on pageload and after voting
// @description
// @version 1.1.1
// @include /^https://stackoverflow\.com/questions/(?:\d+|tagged|search)/
// @run-at document-start
// @grant none
// ==/UserScript==
Terrance / AjaxQueue.js
Created Apr 10, 2016
Limit concurrent jQuery ajax requests to at most 3 at a time, and queue the rest.
View AjaxQueue.js
var ajaxReqs = 0;
var ajaxQueue = [];
var ajaxActive = 0;
var ajaxMaxConc = 3;
function addAjax(obj) {
var oldSuccess = obj.success;
var oldError = obj.error;
var callback = function() {
ebaranov / gist:41bf38fdb1a2cb19a781
Created Sep 27, 2014
Country - state list in JSON
View gist:41bf38fdb1a2cb19a781
"countries": [
"country": "Afghanistan",
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"]
"country": "Albania",
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"]
jayj / flexbox.less
Last active Nov 20, 2019
CSS3 Flexbox - LESS Mixins
View flexbox.less
// --------------------------------------------------
// Flexbox LESS mixins
// The spec:
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
View jQueryPluginPatterns.js
A (very) WIP collection of optimized/recommended jQuery plugin patterns
from @addyosmani, @cowboy, @ajpiano and others.
Whilst the end-goal of this gist is to provide a list of recommended patterns, this
is still very much a work-in-progress. I am not advocating the use of anything here
until we've had sufficient time to tweak and weed out what the most useful patterns
You can’t perform that action at this time.