Skip to content

Instantly share code, notes, and snippets.

View Radivarig's full-sized avatar

Reslav Hollós Radivarig

View GitHub Profile
var setContentByUrl = (url, content) => localStorage[url] = JSON.stringify (content)
var getContentByUrl = (url) => localStorage[url] && JSON.parse(localStorage[url])
var getHttpStringByUrl = (url) => {
var xhr = new XMLHttpRequest()
xhr.open( "GET", url, false)
xhr.send(null)
return xhr.responseText
}
#!/bin/bash
if [ -z "$1" ]; then exit 1; fi
if [ "$1" == "--nologo" ]
then
FILE_PATH="${3%;*}"
FILE_LINE="${3##*;}"
else
FILE_PATH="$1"
#!/bin/sh
# Bash History Session Handler
# save in home and include in '~/.bashrc'
#. ~/.bash_history_session_handler.sh # note the dot and space
# What:
# - Updates each terminal with commands of all terminals for
# reverse searching from any terminal (ctrl +r)