Skip to content

Instantly share code, notes, and snippets.

View A9u's full-sized avatar
👩‍💻

Anusha Bhat A9u

👩‍💻
View GitHub Profile
@A9u
A9u / concurrency-example.go
Last active April 29, 2023 07:18
go routine concurrency example to print sequential numbers using 2 goroutines - one for odd and one for even.
package main
import (
"fmt"
"time"
)
func printNum(waitCh, pauseCh chan int, start, end int) {
fmt.Println("Inside print")
<-waitCh
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[\033[00m\]\[\033[01;34m\]\W\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]'
else
PS1='${debian_chroot:+($debian_chroot)}\W$(parse_git_branch)'
fi
# If this is an xterm set the title to user@host:dir
case "$TERM" in
@A9u
A9u / .vimrc
Last active March 11, 2021 11:09
set ts=2
set sw=2
set expandtab
set hls
set autoindent
set smartindent
filetype plugin indent on
set autoread
set ruler
syntax enable