Skip to content

Instantly share code, notes, and snippets.

View juanlu-sanz's full-sized avatar

Juanlu Sanz Moreno juanlu-sanz

View GitHub Profile
@juanlu-sanz
juanlu-sanz / ssh-generator.sh
Created August 7, 2022 18:20
Simple way to create a brand new SSH key and upload it to a server for authentication
#Draft, please change key name, email and server to copy to.
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/myBrandNewKey -C myemail@mydomain.com
ssh-copy-id -i ~/.ssh/myBrandNewKey myServerUser@myServerDomain
@juanlu-sanz
juanlu-sanz / .minttyrc
Last active May 12, 2016 17:57
My personal .minttyrc
BoldAsFont=no
Columns=150
Rows=55
Font=Menlo for Powerline
FontHeight=10
Black=29,31,33
BoldBlack=150,152,150
Red=204,102,102
BoldRed=222,147,95
Green=181,189,104
@juanlu-sanz
juanlu-sanz / txtFileChecker.html
Created April 21, 2014 17:46
Read a .txt file from Javascript automatically using Filereader. useful for previews before uploading.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Automatic line reading snippet</title>
<meta name="description" content="">
@juanlu-sanz
juanlu-sanz / .bash_ps1
Created September 21, 2012 11:52
Bash profile with separator, time (from Lifehacker) and git branch
#This file should be saved in your home directory.
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
# Fill with minuses