Skip to content

Instantly share code, notes, and snippets.

View obar1's full-sized avatar
:shipit:
looking for a job

mar10 obar1

:shipit:
looking for a job
View GitHub Profile
# teminal set
export TERM=xterm-color
#rsync
function rsync_c107qzb_() {
rsync -avzhe 'ssh -p 22' --delete $1 [email protected]:~/tmp/mc262644/$1
}
function rsync_dss_logan_() {
rsync -avzhe 'ssh -p 22' --delete $1 [email protected]:~/tmp/mc262644/$1
@obar1
obar1 / todo_today.sh
Last active September 28, 2021 16:13
todo today // iterm
#!/bin/bash
set -eux
gittodo="-[ ] "
cd $1
fn__donemd=_done.md
# yest
yest_yymm=$(date -v -1d '+%y%m')
@obar1
obar1 / cloneme_gitusr.sh
Last active October 25, 2023 04:19
cloneme_gitusr.sh
#!/bin/bash
# a std way to to clone author repo
# v0.3
# set -x
# echoy="echo"
while read fromEnv; do
if [ "$fromEnv" != "" ]; then
@obar1
obar1 / install__jetbrain_p_code.sh
Last active January 19, 2021 10:35
install intellij via cmd line on linux
#!/bin/bash
# product donwload
# wget this
# source this
# use in cmd line // download_untar PE
jb_info() {
wget -O- https://plugins.jetbrains.com/docs/marketplace/product-codes.html | sed 's/<[^>]*>/ /g'
# check https://plugins.jetbrains.com/docs/marketplace/product-codes.html
@obar1
obar1 / smallgist.sh
Created February 18, 2020 18:27
Created with Copy to Gist
2
do 'docker ps' to get the names and docker id for your container.
do 'docker exec <docker_id> -it /bin/bash'
this will give you bash prompt inside container.
@obar1
obar1 / smallgist.sh
Created February 18, 2020 09:43
Created with Copy to Gist
Install using tar archives
If snap packages are not available, unpack the pycharm-*.tar.gz file to a different folder, if your current Download folder doesn't support file execution:
tar xfz pycharm-*.tar.gz -C <new_archive_folder>
The recommended installation location according to the filesystem hierarchy standard (FHS) is /opt. To install PyCharm into this directory, enter the following command:
sudo tar xfz pycharm-*.tar.gz -C /opt/
To verify integrity of the downloaded archive, use the SHA checksum linked from the Download page.
Switch to the bin subdirectory:
@obar1
obar1 / smallgist.sh
Created February 18, 2020 07:10
Created with Copy to Gist
12
This microsoft WSL issue completely made it work for me. Essentially it boiled down to:
Abort the do-release-upgrade script
Re-launch Ubuntu
Remove lxd with: sudo dpkg --force depends -P lxd; sudo dpkg --force depends -P lxd-client
Finish with sudo apt upgrade
@obar1
obar1 / smallgist.sh
Created January 25, 2020 21:39
Created with Copy to Gist
Extract new Firefox tarball
# mkdir /opt/firefox
# tar xjf FirefoxSetup.tar.bz2 -C /opt/firefox/
@obar1
obar1 / smallgist.sh
Created January 16, 2020 12:26
Created with Copy to Gist
#!/bin/bash
set -o nounset # exit if trying to use an uninitialized var
set -o errexit # exit if any program fails
set -o pipefail # exit if any program in a pipeline fails, also
set -x # debug mode
@obar1
obar1 / smallgist.sh
Created January 16, 2020 11:08
Created with Copy to Gist
#!/bin/bash
echo Script name: $0
echo $# arguments
if [$# -ne 1];
then echo "illegal number of parameters"
fi