R. Alex Matevish 6 months ago
parent
commit
ea8666bb6b
4 changed files with 17 additions and 3 deletions
  1. 7 0
      git.sh
  2. 2 1
      mac.sh
  3. 6 0
      main.sh
  4. 2 2
      wintermute.sh

+ 7 - 0
git.sh

@@ -37,6 +37,13 @@ if command_exists git; then
     alias gp='git pull origin `git rev-parse --abbrev-ref HEAD`'
     alias gdm='git diff `git bp`...HEAD'
 
+    if command_exists meld; then
+
+	git config --global diff.tool meld
+	git config --global merge.tool meld
+	git config --global --add difftool.prompt false
+    fi;
+
     function git-delete-merged () {
         n=$'\n'
         branches=$(git branch --merged $1 | egrep -v "(^\*|master|dev)");

+ 2 - 1
mac.sh

@@ -64,5 +64,6 @@ function ls-usb {
     ioreg -p IOUSB -w0 | sed 's/[^o]*o //; s/@.*$//' | grep -v '^Root.*'
 }
 function pwinfo {
-	ioreg -w 0 -f -r -c AppleSmartBattery
+  # ioreg -w 0 -f -r -c AppleSmartBattery
+  system_profiler SPPowerDataType
 }

+ 6 - 0
main.sh

@@ -141,3 +141,9 @@ function nmap_scan_port() {
 function md5dir {
     find -s "$1" -type f -exec md5 {} \; | md5
 }
+
+function f2f {
+	for file in *.$1; do
+	    mv -- "$file" "$(basename -- "$file" .$1).$2"
+	done
+}

+ 2 - 2
wintermute.sh

@@ -6,8 +6,8 @@
 
 # Upload a file to wintermute
 function upload() {
-    aliased_path=$(curl -F file=@"$1" https://mtv.sh/files --header "Authorization:mysecret")
-    echo "https://mtv.sh$aliased_path" | tee | pbcopy
+  file=`curl -H 'Authorization: Basic cmFtYXRldmlzaDpVcmlhbDk5MQ==' -F "file=@$1"  https://media.matevi.sh/api/upload.php | jq .url | tr -d '"'`
+  echo "https://media.matevi.sh/$file"
 }
 
 function del-upload() {