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
| /* | |
| By Osvaldas Valutis, www.osvaldas.info | |
| Available for use under the MIT License | |
| */ | |
| ;( function( $, window, document, undefined ) | |
| { | |
| var s = document.body || document.documentElement, s = s.style, prefixAnimation = '', prefixTransition = ''; | |
| if( s.WebkitAnimation == '' ) prefixAnimation = '-webkit-'; |
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
| /* .modal-fullscreen */ | |
| .modal-fullscreen { | |
| background: transparent; | |
| } | |
| .modal-fullscreen .modal-content { | |
| background: transparent; | |
| border: 0; | |
| -webkit-box-shadow: none; | |
| box-shadow: none; | |
| } |
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
| /* | |
| * jQuery.ajaxQueue - A queue for ajax requests | |
| * | |
| * (c) 2011 Corey Frang | |
| * Dual licensed under the MIT and GPL licenses. | |
| * | |
| * Requires jQuery 1.5+ | |
| */ | |
| (function(a){var b=a({});a.ajaxQueue=function(c){function g(b){d=a.ajax(c).done(e.resolve).fail(e.reject).then(b,b)}var d,e=a.Deferred(),f=e.promise();b.queue(g),f.abort=function(h){if(d)return d.abort(h);var i=b.queue(),j=a.inArray(g,i);j>-1&&i.splice(j,1),e.rejectWith(c.context||c,[f,h,""]);return f};return f}})(jQuery) |
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
| // Queue class for serializing AJAX calls. | |
| // | |
| // Inspired by Raynos http://stackoverflow.com/a/4797596/1194060 | |
| // | |
| // Queue has a public append method that expects some kind of task. | |
| // A task is a generic function passed as callback. | |
| // Constructor expects a handler which is a method that takes a ajax task | |
| // and a callback. Queue expects the handler to deal with the ajax and run | |
| // the callback when it's finished |
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
| // By @coderitual | |
| // https://twitter.com/coderitual/status/1112297299307384833 | |
| // Remove any duplicates from an array of primitives. | |
| const unique = [...new Set(arr)] | |
| // Sleep in async functions. Use: await sleep(2000). | |
| const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
| // Type this in your code to break chrome debugger in that line. |
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
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
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
| public class CustomerController : Controller | |
| { | |
| public ViewResult Index() | |
| { | |
| return View(); | |
| } | |
| public ViewResult Edit() | |
| { | |
| var existingCustomer = new Customer(); |
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
| { | |
| "name": "project-name", | |
| "description": "Template for static sites", | |
| "version": "1.0.0", | |
| "homepage": "http://www.project-name.com", | |
| "author": { | |
| "name": "Adam Reis", | |
| "url": "http://adam.reis.nz" | |
| }, | |
| "license": "UNLICENSED", |
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
| # Simple PowerShell script to load-test / test REST api with headers and cookies. | |
| # Harald S. Fianbakken | |
| $headers = @{ | |
| "Accept"= "application/zip"; | |
| "Accept-Encoding"= "gzip,deflate,sdch"; | |
| "My-Token-ID" = "This_is_a_test"; | |
| }; | |
| function Create-Cookie($name, $value, $domain, $path="/"){ |
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
| workflow PingUrlParallel { | |
| param( | |
| [string]$url, | |
| [int]$parallelCount = 10, | |
| [int]$iterations = 10 | |
| ) | |
| foreach -parallel ($x in 1..$parallelCount) { | |
| 1..$iterations | %{ |
OlderNewer