Skip to content

Instantly share code, notes, and snippets.

View goFrendiAsgard's full-sized avatar

Go Frendi Gunawan goFrendiAsgard

View GitHub Profile
package main
import (
"fmt"
"gopkg.in/yaml.v3"
)
var data string = `
# comment
git checkout -b darwin-enchancement # buat branch baru (seperti membuat dunia parallel)
echo "tambah fitur ldarwin-enchancement" >> catatan-sejarah.txt # lakukan perubahan
git add . -A
git commit -m 'tambah fitur ldarwin-enchancement' # lakukan commit
git push -u origin darwin-enchancement # simpan branch ke github
git log
cat catatan-sejarah.txt # di sini file catatan-sejarah berisi 2 baris text
git checkout master # kembali ke dunia parallel "light-and-darkness"
git checkout -b light-and-darkness # buat branch baru (seperti membuat dunia parallel)
echo "tambah fitur light-and-darkness" >> catatan-sejarah.txt # lakukan perubahan
git add . -A
git commit -m 'tambah fitur light-and-darkness' # lakukan commit
git push -u origin light-and-darkness # simpan branch ke github
git log
cat catatan-sejarah.txt # di sini file catatan-sejarah berisi 2 baris text
git checkout master # kembali ke dunia parallel awal
git remote add origin git@github.com:goFrendiAsgard/git-workshop.git # menghubungkan repository lokal dengan repository publik di github
git push -u origin master # push ke github
echo "awal yang bagus" > catatan-sejarah.txt # buat file "catatan-sejarah.txt", beri nilai "awal yang bagus"
git add . -A # stage semua file dalam directory ini. Tanda "." berarti "current directory", dan parameter "-A" berarti semua
git commit -m "sebuah awal" # commit semua perubahan sejauh ini dengan pesan "sebuah awal"
git log # lihat semua sejarah sejauh ini
# commit f3708176f813ec10e0c92b4724ce422320c4ede0 (HEAD -> master)
# Author: gofrendi <gofrendiasgard@gmail.com>
# Date: Thu Mar 26 16:29:07 2020 +0700
#
mkdir git-workshop
cd git-workshop
git init
sudo apt-get install git
#!/bin/sh
for buah in $(echo jeruk strawberry anggur)
do
echo ${buah}
done
for angka in $(seq 0 2)
do
echo ${angka}
#!/bin/sh
NILAI=50
if [ $NILAI -gt 90 ]
then
echo "Gold"
elif [ $NILAI -gt 70 ]
then
echo "Silver"
#!/bin/sh
# baca dari input argument
NAME=${1}
echo Hello ${NAME}
# baca dari jawaban user
echo "What is your name again?"
read NAME
echo Hello ${NAME}