Skip to content

Instantly share code, notes, and snippets.

View themicon's full-sized avatar
🎯
Focusing

Themicon themicon

🎯
Focusing
View GitHub Profile
@themicon
themicon / type.bash
Created February 2, 2022 17:30 — forked from jukefr/type.bash
convert text to keystrokes and send to a Virtualbox machine via VBoxManage (scuffed clipboard)
#!/usr/bin/env bash
# requires bash 4+ (for associative arrays)
# description: convert text to keystrokes and send to a Virtualbox machine via VBoxManage
# (when guest additions are not an option, for adding ssh-keys and such, it is quite slow)
# usage: ./type $1 $2
# $1: virtual machine name
# $2: text to type
@themicon
themicon / git.migrate
Last active September 4, 2019 11:27 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
// SmoothScroll v0.9.9
// Licensed under the terms of the MIT license.
// People involved
// - Balazs Galambosi: maintainer (CHANGELOG.txt)
// - Patrick Brunner (patrickb1991@gmail.com)
// - Michael Herf: ssc_pulse Algorithm
$ = jQuery.noConflict();
function ssc_init(){if(!document.body)return;var e=document.body;var t=document.documentElement;var n=window.innerHeight;var r=e.scrollHeight;ssc_root=document.compatMode.indexOf("CSS")>=0?t:e;ssc_activeElement=e;ssc_initdone=true;if(top!=self){ssc_frame=true}else if(r>n&&(e.offsetHeight<=n||t.offsetHeight<=n)){ssc_root.style.height="auto";if(ssc_root.offsetHeight<=n){var i=document.createElement("div");i.style.clear="both";e.appendChild(i)}}if(!ssc_fixedback){e.style.backgroundAttachment="scroll";t.style.backgroundAttachment="scroll"}if(ssc_keyboardsupport){ssc_addEvent("keydown",ssc_keydown)}}function ssc_scrollArray(e,t,n,r){r||(r=1e3);ssc_directionCheck(t,n);ssc_que.push({x:t,y:n,lastX:t<0?.99:-.99,lastY:n<0?.99:-.99,start:+(new Date)});if(ssc_pending){return