Skip to content

Instantly share code, notes, and snippets.

View Rawa's full-sized avatar

David Göransson Rawa

View GitHub Profile
@Rawa
Rawa / gsd
Last active January 17, 2020 10:07
gsd - Git Status Directories, check status of multiple directories simultainously
#!/usr/bin/env bash
for var in "$@"
do
if [[ -d $target ]]; then
cd $target
pwd
git fetch
git status | sed -n 2p
git status --porcelain
echo ""

Keybase proof

I hereby claim:

  • I am rawa on github.
  • I am rawa (https://keybase.io/rawa) on keybase.
  • I have a public key whose fingerprint is 47E4 CFA0 C469 0D47 8B1B 809D F5E8 E38C 0792 FDBF

To claim this, I am signing this object:

@Rawa
Rawa / upload
Last active August 29, 2015 14:21
Simple upload script that sends file to your server, also copy the url to file to the clipboard.
#/usr/bin/env bash
version="1.0"
upload_path="/data/upload/"
server="srv"
#Url of the website (used for copying url to clipboard)
url="http://upload.yourwebsite.com/"
function print_help {
echo "Upload files to your remote server"
@Rawa
Rawa / HasteUpload Vim
Last active January 27, 2016 12:39
Sweet vim function to upload selected lines to hastebin and copy url to clipboard.
function HasteUpload() range
echo system('echo '.shellescape(join(getline(a:firstline, a:lastline), "\n")).'| haste | xsel -ib')
endfunction