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
#!/bin/sh | |
# | |
# This script can clone/checkout a single folder from git repository | |
# - Might be used for checking out micro-services from monolithic git repository | |
# | |
# - You can even do checkout into home directory, for example | |
# git-sparse-clone.sh [email protected]:readdle/fluix-web.git /home/login login | |
# | |
# This will cause the shell to exit immediately if a simple command exits with a nonzero exit value. |
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
#One workaround is to create clone environment, and then remove original one: | |
#(remember about deactivating current environment with deactivate on Windows and source deactivate on macOS/Linux) | |
conda create --name new_name --clone old_name --offline #use --offline flag to disable the redownload of all your packages | |
conda remove --name old_name --all # or its alias: `conda env remove --name old_name` | |
#There are several drawbacks of this method: | |
# time consumed on copying environment's files, | |
# temporary double disk usage. |
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
javascript:(function() { | |
function copyToClipboard(text) { | |
if (window.clipboardData && window.clipboardData.setData) { | |
/*IE specific code path to prevent textarea being shown while dialog is visible.*/ | |
return clipboardData.setData("Text", text); | |
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { | |
var textarea = document.createElement("textarea"); | |
textarea.textContent = text; |
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 url: Medium remove location hash Greasemonkey | |
// @namespace http://efcl.info/ | |
// @description Remove location hash from medium | |
// @include *#.* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// TamperMonkey does not work well with hash '#' in @include urls: |
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 UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @version 1.2 | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http*://*?* | |
// @grant none | |
// ==/UserScript== |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |