Skip to content

Instantly share code, notes, and snippets.

View thers's full-sized avatar
🔥
chart you

Aleksandr Kukhta thers

🔥
chart you
View GitHub Profile
"use strict";
(function (ng, w) {
try {
var module = ng.module('user.directives');
} catch(e) {
var module = ng.module('user.directives', []);
}
module
#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
@thers
thers / README.md
Last active August 29, 2015 14:07 — forked from addyosmani/README.md

CSS Layout Debugger

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

@thers
thers / hsl2rgb.js
Last active November 27, 2015 13:56
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]
@thers
thers / stdev.js
Created December 4, 2015 11:22
Standard deviation func
/**
* 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);
@thers
thers / BiasedRandom.js
Last active December 4, 2015 11:35
Biased random generator
function boundrand (min, max) {
return min + (Math.random() * (max - min));
}
export default class BiasedRandom {
/**
* Ctor
*
* @example
@thers
thers / _IDE_PHPSTORM_HELPER.php
Created February 5, 2013 13:30
Laravel IDE helper file
<?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.
@thers
thers / RunBackground.php
Last active December 19, 2015 22:38
Simple non-blocking command runner
<?php
/**
* Simple non-blocking command runner
*
* Class RunBackground
*/
class RunBackground {
/**
* Running command without waiting for it to complete
<?php
class Hash {
/**
* Hash a password using the Bcrypt hashing scheme.
*
* <code>
* // Create a Bcrypt hash of a value
* $hash = Hash::make('secret');
@thers
thers / anyway.js
Last active March 10, 2016 08:43
When you need to initialize jquery plugin when using AngularJS (or something else which dinamically includes html). In case of AngularJS i was needed to render user-generated articales which contains HTML code inside of AngularJS app using $sce.trustAsHtml(), but the thing is about directives dont work inside this HTML and it shouldn't in fact (…
/**
* 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);