wget -P /destination/ -mpck --user-agent="" -e robots=off --random-wait -E http://example.com/
Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:
- preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
- actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location
NB: Check out git subtree
/git submodule
and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.
Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
// C++ includes used for precompiling -*- C++ -*- | |
// Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
// | |
// This file is part of the GNU ISO C++ Library. This library is free | |
// software; you can redistribute it and/or modify it under the | |
// terms of the GNU General Public License as published by the | |
// Free Software Foundation; either version 3, or (at your option) | |
// any later version. |
javascript:(() => { | |
const items = document.querySelectorAll('a'); | |
let delay = 0; | |
for (let index = 0; index < items.length; index++) { | |
const item = items[index]; | |
item.setAttribute('download', item.getAttribute('href')); | |
setTimeout(() => item.click(), delay); | |
delay += 500; | |
} | |
})(); |
/** | |
* ASCIIfy–Hexify bookmarklet | |
* v.92 | |
* | |
* Authors: Lucas Larson, 2017 | |
* Steve Kangas, 1998 | |
* | |
* Description: This is the JavaScript behind a bookmarklet to obtain the | |
* ASCII₁₀ value and hexadecimal value of any single character. | |
* |
javascript:(function(){function%20a(n,t){return'<a%20href="'+loc+"#"+n+'"%20title="'+t+":%20"+n+'"%20style="text-decoration:none;padding:.2em;background:#fff;border:1px%20solid%20black;display:block;position:absolute;z-index:2147483647;border-radius:3px;-webkit-box-shadow:0%203px%207px%20rgba(0,0,0,0.3);box-shadow:0%203px%207px%20rgba(0,0,0,0.3)">#'+n+"</a>"}var%20$,loc=location.href,anchorPos=location.href.lastIndexOf("#");anchorPos>-1&&(loc=loc.substring(0,anchorPos)),function(u,c){var%20h=document.getElementsByTagName("head")[0],s=document.createElement("script");s.src=u;var%20d=!1;s.onload=s.onreadystatechange=function(){d||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(d=!0,c(),s.onload=s.onreadystatechange=null,h.removeChild(s))},h.appendChild(s)}("//code.jquery.com/jquery-3.3.1.min.js",function(){$=jQuery,$("a[name]").each(function(i){$(a(this.name,"name")).insertBefore(this)}),$("[id]:not(input[type='hidden'])").each(function(i){switch(this.nodeName){case"TD":$(this).prepend |
-- Run the following cmd to make Transmit marry iterm2 as its Terminal partner: | |
-- defaults write com.panic.Transmit OpenTerminalScriptPath ~/transmit-iterm-patch.applescript | |
on openTerminal(location, remoteHost, serverPort) | |
-- Prepare sshCmd and cmd: | |
set sshCmd to "" | |
set cmd to "cd \"" & location & "\"" | |
if ((count of remoteHost) is greater than 0) then | |
set sshCmd to "ssh " & remoteHost |
## | |
# This is an adoption from Oh My Zsh for Google Cloud Shell | |
## | |
main() { | |
# Install zsh | |
sudo apt-get -qq update | |
sudo apt-get -qq install zsh -y |