Skip to content

Instantly share code, notes, and snippets.

View myfreeer's full-sized avatar
💭
I may be slow to respond.

myfreeer

💭
I may be slow to respond.
View GitHub Profile
@myfreeer
myfreeer / URLSearchParams.js
Last active April 28, 2018 03:19
URLSearchParams polyfill in es6, licensed MIT
class URLSearchParams {
constructor(str) {
if (str) this._parse(str);
}
_getStr(key) {
return Array.isArray(this[key]) ? this[key].map(value => `${key}=${encodeURIComponent(value)}`).join('&') : `${key}=${encodeURIComponent(this[key])}`;
}
_parse(str) {
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@aras-p
aras-p / preprocessor_fun.h
Last active May 23, 2024 08:26
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,