20 Agustus 2017

Copas Kilat

Copas Kilat

Beberapa copas yang sering digunakan
  • .bash_aliases
alias cl='clear'
alias h='history'
alias mv='mv -i'
alias rm='rm -i'
alias sss='. ~/.profile'
gitstat() {
git rev-parse --is-inside-work-tree &> /dev/null
[ "$?" == "0" ] && git status
ls -aF
printf "ZCZCNNNN ==== ===== PWD:%s\n" $(pwd)
}
export EDITOR=/usr/bin/vi
export HISTSIZE=2000
export HISTFILESIZE=2000
  • .gitconfig

# (c) 2016-2022 BinKadal, Sdn.Bhd.
# This is a simple free git config file
# REV08: Sat 19 Nov 2022 12:00
# REV07: Mon 10 Aug 2020 05:00
# START: Thu 22 Dec 2016 19:00  
[user]  
      email      = cbkadal@ema.il  
      name       = BinKadal  
      signingkey = XYZZY
[core]
      editor = vi
[push]  
      default = simple  
[http]  
      postBuffer = 994288000  
[https]  
      postBuffer = 994288000  
[credential]  
      helper = cache --timeout=50000  
  • shsh
#!/bin/bash  
# shsh:
# REV03: Sat 19 Nov 2022 12:00
# REV02: Fri 28 Apr 2017 19:00  
# REV01: Wed 28 Sep 2016 20:00  
# START: Wed 27 Jun 2012 00:00  
# Copyright (C) 2012-2022 BinKadal, Sdn.Bhd.
# This program is free script/ software. This program is distributed in the hope   
# that it will be useful, but WITHOUT ANY WARRANTY; without even the implied   
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
[ -f .shsh ] && {  
    /bin/bash .shsh $*  
    exit 0  
}  
echo "Where is the .shsh file???"  
exit 1  
  • /etc/default/grub

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
  • GIT

#!/bin/bash
# REV19: Sat 19 Nov 2022 12:00
# REV11: Mon 25 Apr 2022 04:00
# REV10: Sun 18 Oct 2020 16:00
# REV09: Sat 06 Jul 2019 06:00
# REV03: Sun 07 Jan 2018 21:00
# START: Wed 10 Aug 2016 13:00

# Copyright (C) 2016-2022 BinKadal, Sdn.Bhd.
# This program is free script/software. This program is distributed in the hope 
# that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

XX="xx"

for ii in `ls` ;
do
   echo "XXXXXXXXXX XX XX XXXX $ii"
   cd $ii
   git ls-remote -q -h > /dev/null 2>&1
   [ "$?" != "0" ] && {
      echo -n "XXXXXXXXXX SLEEP 20 XX $ii"
      sleep 15
      git ls-remote -q -h > /dev/null 2>&1
      sleep 5
      echo  "OK"
      git ls-remote -q -h > /dev/null 2>&1
      [ "$?" != "0" ] && {
         echo "No $ii !!!!! !!!!!"
         exit 0
      }
   }
   sleep 2
   nice -15 git pull --all
   echo -n "2 "
   nice -15 git add -A
   nice -15 git commit -m "$HOSTNAME: $ii"
   sleep 2
   nice -15 git push --all
   echo "4 OK"
   [[ "$1" == "$XX" ]] && {
      echo -n "======================   ======================   $ii   "
      du -s -h . 
      git gc --prune=now --aggressive
      echo -n "======================   ======================   $ii   "
      du -s -h .
   }
   cd ..
done

exit 0



DISCLAIMER


This is HOW Me Do IT! Grrr... this blog memo is mainly written for OWN PURPOSES. This post is based on "Google There, Google Here, Try That, Try This, Then Ask". Whether this is PLAGIARY or RESEARCH, there has never been a claim that this is an original work, nor is it necessarily the best solution, and not for Scopus consumption :). Please provide feedback, especially if you have alternative explanations. Hopefully, this note will be helpful in the future when you have forgotten how to solve this trivia problem.


DISKLAIMER


INIlah yang KUlakukan! Grrr... memo blog ini terutama ditulis untuk KEPERLUAN SENDIRI. Tulisan ini berbasis "Google Sana, Google Sini, Coba Itu, Coba Ini, Lalu Tanya-tanyi". Entah ini PLAGIAT, entah ini RISET, yang jelas tidak pernah ada klaim bahwa ini merupakan karya asli, serta belum tentu pula merupakan solusi terbaik, serta bukan untuk konsumsi Scopus :). Mohon kiranya memberikan tanggapan, terutama jika memiliki solusi alternatif. Semoga catatan ini akan bermanfaat di masa mendatang, saat sudah lupa cara menyelesaikan masalah trivia ini.

Qapla!

Tidak ada komentar:

Posting Komentar