A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| /** | |
| * Calculates standrad deviation | |
| * | |
| * @param {Array} arr | |
| * @returns {number} | |
| */ | |
| function standradDeviation (arr) { | |
| const n = arr.length; | |
| const bias = Math.pow(arr.reduce((acc, v) => acc+v, 0)/n , 2); | |
| const s2 = arr.reduce((acc,v) => acc+(v*v-bias), 0)/(n-1); |
| function hsl2rgb(h,s,l){s=s/100;l=l/100;var c,x,m,rgb;c=(1-Math.abs(2*l-1))*s;x=c*(1-Math.abs(((h/60)%2)-1));m=l-c/2;if(h>=0&&h<60)rgb=[c,x,0];if(h>=60&&h<120)rgb=[x,c,0];if(h>=120&&h<180)rgb=[0,c,x];if(h>=180&&h<240)rgb=[0,x,c];if(h>=240&&h<300)rgb=[x,0,c];if(h>=300&&h<360)rgb=[c,0,x];return rgb.map(v=>255*(v+m)|0);} | |
| hsl2rgb(145, 80, 50); // [25, 229, 110] |
| <?php | |
| /** | |
| * This file is a part of something wonderful :) | |
| * | |
| * @author: RiderSx alexridersx[at]gmail.com | |
| * @file: Phonetic.php | |
| */ | |
| function dmword($string, $is_cyrillic = true) { | |
| static $codes = array( |
| #BUGS! In General | |
| - Game crashes during story cinematic, near players or garage exits. | |
| - Black screens of death. (SLI, or other graphics cards.) | |
| - Game freezes during gameplay with short sound loops but resumes play. (server connection issues?) | |
| - Error #90dcd68f_3_27 when Alt+F4 the game. | |
| - Flickering and shadow bug spots in some areas.(For Players - Set game priority to high.) | |
| - Crackling/static noises and weird sounds from the game.(For Players - Set game priority to high.) | |
| - Odometer and achievements reset to zero every time you leave the game. | |
| - First Mission is impossible to do even in low settings and high FPS. | |
| - Sometimes, in the missions, the game changes my car or shows the wrong one |
| "use strict"; | |
| (function (ng, w) { | |
| try { | |
| var module = ng.module('user.directives'); | |
| } catch(e) { | |
| var module = ng.module('user.directives', []); | |
| } | |
| module |
| /** | |
| * Executes given callback only if some element found by given selector | |
| * | |
| * @param {String} selector | |
| * @param {Function} cb | |
| */ | |
| window.anyway = function (selector, cb) { | |
| var | |
| interval = setInterval(function () { | |
| var el = $(selector); |
| <?php | |
| class Hash { | |
| /** | |
| * Hash a password using the Bcrypt hashing scheme. | |
| * | |
| * <code> | |
| * // Create a Bcrypt hash of a value | |
| * $hash = Hash::make('secret'); |
| <?php | |
| /** | |
| * Simple non-blocking command runner | |
| * | |
| * Class RunBackground | |
| */ | |
| class RunBackground { | |
| /** | |
| * Running command without waiting for it to complete |
| <?php | |
| /** | |
| * @method static bool guest() Determine if the user of the application is not logged in. | |
| * @method static bool check() Determine if the user is logged in. | |
| * @method static User|null user() Get the current user of the application. | |
| * @method static User|null retrieve(int $id) Get the a given application user by ID. | |
| * @method static bool attempt(array $arguments) Attempt to log a user into the application. | |
| * @method static bool login(mixed $token,bool $remember = false) Login the user assigned to the given token. | |
| * @method static logout() Log the user out of the driver's auth context. |