ssh-copy-id -i ~/.ssh/mykey user@host
ssh-keyscan -t ecdsa server.domain >> ~/.ssh/known_hosts
function bubbleSort(arr) { | |
for (var i = 0; i < arr.length - 1; i++) { | |
for (var j = 0; j < arr.length - 1 - i; j++) { | |
if (arr[j] > arr[j+1]) { | |
var temp = arr[j]; | |
arr[j] = arr[j+1]; | |
arr[j+1] = temp; | |
} | |
} | |
} |
javascript:(function() { | |
"use strict"; | |
var TEMPLATES = [ | |
[/^(https?):\/\/gitlab\.com\/([^\/]+\/[^\/]+)\/(?:raw|blob)\/(.+\..+?)(?:\?.*)?$/i, '$1://gl.githack.com/$2/raw/$3'], | |
[/^(https?):\/\/bitbucket\.org\/([^\/]+\/[^\/]+)\/(?:raw|src)\/(.+\..+?)(?:\?.*)?$/i, '$1://bb.githack.com/$2/raw/$3'], | |
[/^(https?):\/\/bitbucket\.org\/snippets\/([^\/]+\/[^\/]+)\/revisions\/([^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+\..+?))$/i, '$1://bb.githack.com/!api/2.0/snippets/$2/$3/files/$4'], | |
[/^(https?):\/\/bitbucket\.org\/snippets\/([^\/]+\/[^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+\..+?))$/i, '$1://bb.githack.com/!api/2.0/snippets/$2/HEAD/files/$3'], | |
[/^(https?):\/\/bitbucket\.org\/\!api\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+\..+?)(?:\?.*)?$/i, '$1://bb.githack.com/!api/2.0/snippets/$2/files/$3'], | |
[/^(https?):\/\/api\.bitbucket\.org\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+\..+?)(?:\?.*)?$/i, '$1://bb.githack.com/!api/2.0/snippets/$2/files/$3'], | |
[/^( |
javascript: (function() { | |
let devDomain = 'rawgit.com'; | |
const GITHUB_API_URL = 'https://api.github.com'; | |
const REGEX_GIST_URL = /^https?:\/\/gist\.github\.com\/.+?\/([0-9a-f]+)(?:\/([0-9a-f]+))?/i; | |
const REGEX_RAW_GIST_URL = /^https?:\/\/gist\.githubusercontent\.com\/(.+?\/[0-9a-f]+\/raw\/(?:[0-9a-f]+\/)?.+\..+)$/i; | |
const REGEX_RAW_REPO_URL = /^https?:\/\/raw\.github(?:usercontent)?\.com\/(.+?)\/(.+?)\/(.+?)\/(.+)/i; | |
const REGEX_REPO_URL = /^https?:\/\/github\.com\/(.+?)\/(.+?)\/(?!releases\/)(?:(?:blob|raw)\/)?(.+?)\/(.+)/i; | |
formatUrl(); | |
function formatRawGistUrl(url) { |
var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; | |
var isChrome = !!window.chrome && !!window.chrome.webstore; | |
var isFirefox = typeof InstallTrigger !== 'undefined'; | |
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; |
javascript:(function () {location = 'https://via.hypothes.is/' + location.href;})() |
javascript: (function() { | |
var count = 0, | |
text; | |
text = prompt("Search phrase:", ""); | |
if (text == null || text.length == 0) return; | |
if (!window.__obody) window.__obody = document.body.cloneNode(true); | |
function searchWithinNode(node, te, len) { | |
var pos, skip, spannode, middlebit, endbit, middleclone; | |
skip = 0; |
javascript: function getSelSource() { | |
x = document.createElement('div'); | |
x.appendChild(window.getSelection().getRangeAt(0).cloneContents()); | |
return x.innerHTML; | |
} | |
function makePre(text) { | |
p = nd.createElement('pre'); | |
c = nd.createElement('code'); | |
c.setAttribute('class', 'language-html'); |
javascript: (function() { | |
if (document.getElementById('__vconsole')) return; | |
function callback() { | |
var vConsole = new VConsole(); | |
} | |
var s = document.createElement("script"); | |
s.src = "https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.0.0/vconsole.min.js"; | |
if (s.addEventListener) { | |
s.addEventListener("load", callback, false) | |
} else if (s.readyState) { |