Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Hazrat Gadjikerimov hazratgs

🏠
Working from home
Block or report user

Report or block hazratgs

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
@gpchelkin
gpchelkin / dante_setup.sh
Last active Jun 16, 2019
How To Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04
View dante_setup.sh
### NOT A SCRIPT, JUST A REFERENCE!
# install dante-server
sudo apt update
sudo apt install dante-server
# or download latest dante-server deb for Ubuntu, works for 16.04 and 18.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-2build1_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
@subfuzion
subfuzion / curl.md
Last active Jun 27, 2019
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@philfreo
philfreo / localstorage_safari_private_shim.js
Last active Mar 5, 2019
Don't let localStorage/sessionStorage setItem throw errors in Safari Private Browsing Mode
View localstorage_safari_private_shim.js
// Safari, in Private Browsing Mode, looks like it supports localStorage but all calls to setItem
// throw QuotaExceededError. We're going to detect this and just silently drop any calls to setItem
// to avoid the entire page breaking, without having to do a check at each usage of Storage.
if (typeof localStorage === 'object') {
try {
localStorage.setItem('localStorage', 1);
localStorage.removeItem('localStorage');
} catch (e) {
Storage.prototype._setItem = Storage.prototype.setItem;
Storage.prototype.setItem = function() {};
@codedokode
codedokode / js-task-1.md
Last active Jun 23, 2019
Задания на яваскрипт (простые)
View js-task-1.md
@realmyst
realmyst / gist:1262561
Created Oct 4, 2011
Склонение числительных в javascript
View gist:1262561
function declOfNum(number, titles) {
cases = [2, 0, 1, 1, 1, 2];
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
}
use:
declOfNum(count, ['найдена', 'найдено', 'найдены']);
You can’t perform that action at this time.