Skip to content

Instantly share code, notes, and snippets.

View iambryancs's full-sized avatar
💭
Wishing it's Friday already...

Bryan CS iambryancs

💭
Wishing it's Friday already...
View GitHub Profile
@iambryancs
iambryancs / fix-corrupt-zsh-history-file.md
Created May 17, 2023 00:35
Fix corrupt ZSH history file

Fix corrupt ZSH history file

Problem

zsh: corrupt history file /home/bryancs/.zsh_history

Solution:

mv ~/.zsh_history ~/.zsh_history_bad
@iambryancs
iambryancs / linux-process-elapse-time.md
Created May 12, 2023 00:30
Get Linux process elapse time

Get Linux process elapse time

Get process id

$ pidof tar
1388

Use ps with elapse time

$ ps -p 1388 -o etime

Add the repo

$ sudo add-apt-repository ppa:neovim-ppa/unstable

Update & install

$ sudo apt-get update
$ sudo apt-get install neovim
@iambryancs
iambryancs / alt_tab_current_ws_gnome.md
Created October 5, 2022 03:32
Alt+Tab on current workspace only GNOME

In order to cycle through windows with alt+tab on the current workspace, run:

gsettings set org.gnome.shell.app-switcher current-workspace-only true
@iambryancs
iambryancs / curl-bypass-lb.md
Created September 20, 2022 11:21
Using cURL to bypass a load balancer

Using cURL to bypass a load balancer

curl -v -H "Host: www.example.com" \
  http://172.16.60.4:8080/some/pah
@iambryancs
iambryancs / enable-thumbnail-preview-pop-os.md
Last active September 8, 2022 01:05
Enable MP4 thumbnail preview in Ubuntu/Pop OS

Install the packages

sudo apt install libdvdnav4 libdvd-pkg gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libdvd-pkg

Then follow the on-screen instructions such as

sudo dpkg-reconfigure libdvd-pkg

Install restricted extras such as extra codecs and MS Fonts

sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install -y docker-ce
sudo usermod -aG docker ${USER}
@iambryancs
iambryancs / deploy.sh
Created December 9, 2016 17:16
Sample jenkins shell command
chmod +x deploy.sh
./deploy.sh
RUN chmod +x ./test/test.sh
RUN ./test/test.sh
@iambryancs
iambryancs / test.sh
Created December 9, 2016 16:58
Sample test.sh
#!/bin/bash
./node_modules/.bin/mocha ./test/test.js