This file contains 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
// 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, |
This file contains 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
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 |
This file contains 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
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) { |
This file contains 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
git config --global http.proxy http://127.0.0.1:8087 | |
git config --global https.proxy http://127.0.0.1:8087 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
set_proxy() { | |
git config http.proxy 127.0.0.1:8087 | |
git config https.proxy 127.0.0.1:8087 | |
git config http.sslVerify false |
This file contains 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
var myEvents = ["contextmenu", "select", "selectstart", "copy", "cut", "paste", "drag", "dragend", "dragenter", "dragleave", "dragover", "dragstart", "drop"]; | |
if (window.restrictIsFucked) myEvents.push("wheel", "select", "focus", "scroll", "keydown", "keypress", "keyup", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "mousewheel", "pointercancel", "pointerdown", "pointerenter", "pointerleave", "pointermove", "pointerout", "pointerover"); | |
[...document.getElementsByTagName('*'), document, window] | |
.map(element => getEventListeners(element)) | |
.map(eventListeners => myEvents | |
.map(eventName => eventListeners[eventName]) | |
.filter(e => e === 0 || e) | |
.map(events => [...events].forEach(event => event.remove()))); | |
window.restrictIsFucked = 1; |
This file contains 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
// ==UserScript== | |
// @name 百度网盘直接下载助手 | |
// @namespace undefined | |
// @version 0.9.24 | |
// @description 直接下载百度网盘和百度网盘分享的文件,避免下载文件时调用百度网盘客户端,获取网盘文件的直接下载地址 | |
// @author ivesjay | |
// @downloadURL https://gist.github.com/myfreeer/1106826093c401d5276bd35247a1465b/raw/baidu-pan.user.js | |
// @match *://pan.baidu.com/disk/home* | |
// @match *://yun.baidu.com/disk/home* | |
// @match *://pan.baidu.com/s/* |
This file contains 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
let arr = `112.80.248.52 | |
27.221.40.46 | |
119.75.219.40 | |
111.13.12.44 | |
111.13.12.22 | |
111.13.100.27 | |
117.185.16.83 | |
117.185.16.84 | |
117.185.16.13`.split('\n'); | |
arr = arr.map(url=>'http://'+url); |
This file contains 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
version: 1.0.{build} | |
install: | |
- ps: >- | |
$gitData = ConvertFrom-StringData (git log -1 --format=format:"commitId=%H%nmessage=%s%ncommitted=%aD" | out-string) | |
if ($gitData['message'] -eq "") { $gitData['message'] = "No commit message available for $($gitData['commitid'])" } | |
# View the data with Write-Output @gitData | |
Update-AppveyorBuild @gitData |
This file contains 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
version: 1.0.{build} | |
build_script: | |
- cmd: >- | |
C:\msys64\usr\bin\pacman -Syyuu --noconfirm | |
C:\msys64\usr\bin\pacman -Suu --noconfirm | |
appveyor DownloadFile https://gist.github.com/myfreeer/c8df0b2acbf97e8b391ca741e5248f3f/raw/tinycc-build.sh | |
set MSYSTEM=MINGW64 |
OlderNewer