Skip to content

Instantly share code, notes, and snippets.

Avatar

JGWill jgwill

View GitHub Profile
View gos-ubunjgwill.sh
#!/bin/bash
# This script will have what I love on Ubuntu so I could share and quickly install that on a new workstation/server machine.
# Screenshooting and annotating + sharing
apt install flameshot -y
## Pretty cool screenshot and annotation that you can quickly share to IMGUr
@jgwill
jgwill / jgwill-docker-node-210131-install.sh
Last active Jan 31, 2021
jgwill/node - Docker package installer running in the build script of the container
View jgwill-docker-node-210131-install.sh
npm i node-gip --y
npm i ginol --g
npm i gixb --g
npm i miur --g
@jgwill
jgwill / gfs-git-dup.sh
Created Jan 24, 2021
Duplicate GIT branching - branch a file to a new one and keep the original using the same data in the repo so they wont be stored twice
View gfs-git-dup.sh
#!/bin/bash
dupsrc=$1
newname=$2
branchname="dup-$dupsrc-$newname"
git checkout -b $branchname
git mv "$dupsrc" "$newname"
git commit . -m "dup:mv $dupsrc $newname"
@jgwill
jgwill / 00-git-dup-file-2101082331.md
Last active Jan 9, 2021
Branch copy-merge strategy for GIT to duplicate file that uses the same source in the repo
View 00-git-dup-file-2101082331.md

Branch copy-merge strategy for GIT to duplicate file that uses the same source in the repo

# I RAN BRANCHING twice with theses two dir with few operation at the end
export targetdir=gia-young-picasso-v05-2101082232
export srcdir1=gia-young-picasso-v05-add
export srcdir2=gia-young-picasso-v03-201216

## BRANCHING
for srcdir in $srcdir1 $srcdir2; do
@jgwill
jgwill / bash_aliases__hawk.sh
Created Jan 7, 2021
@stcgoal Enhance existing linux output commands (History)
View bash_aliases__hawk.sh
#@STCGoal Enhance existing linux output commands
alias hawk="history | awk '// { print \$2\" \"\$3\" \"\$4\" \"\$5\" \"\$6\" \"\$7\" \"\$8\" \"\$9\" \"\$10\" \"\$11\" \"\$12\" \"\$13\" \"\$14\" \" }
## INSTALL
### ADD to .bash_aliases in $HOME
vi $HOME/.bash_aliases
@jgwill
jgwill / Can we tar achive via SSH? 201223171246.md
Last active Dec 23, 2020
Can we tar achive via SSH? 201223171246
View Can we tar achive via SSH? 201223171246.md

#Can we tar achive via SSH?

YES

This script does :

  • connect to the host
  • change dir to the desired
  • extract into local dir desired
@jgwill
jgwill / gia-replicate-ref2012231720.pl
Created Dec 23, 2020
@stcissue How do you manage machine learning learning states adequately ?
View gia-replicate-ref2012231720.pl
import torch
import replicate
def train():
# Save training code and hyperparameters
experiment = replicate.init(path=".", params={...})
model = Model()
for epoch in range(num_epochs):
# ...
@jgwill
jgwill / bash-for-f-append-suffix.sh
Last active Dec 16, 2020
BASH Script appending suffix to each file in current dir to a target dir 2012160339 & related
View bash-for-f-append-suffix.sh
td=/a/lib/results/_comparer_it-135k-300k-model_gia-young-picasso-201210_new
ext=jpg
suffix="-300k"
for f in x*1k* ; do ft=${f%.*} ;echo "cp $f $td/$ft$suffix.$ext" ; done
@jgwill
jgwill / remote-x11-bashrc-autoset-display.md
Created Dec 6, 2020
Remote X11 Forwarding - An auto setting of the SSH (remote) IP as a target for the display
View remote-x11-bashrc-autoset-display.md

Remote X11 Forwarding - An auto setting of the SSH (remote) IP as a target for the display

Add to .bashrc

export myip=$(export myipis=$(last | grep "still logged" | awk '/still/ { print $3 }') ; echo $myipis | awk '// { print $1 }')
export DISPLAY=$myip:0.0
View x__github_api__nodejs__2012030818.dissimination-method-.md

#--@STCGoal Create Gist really quickly when experimenting

##--@STCIssue Why creating Gist when Experimenting ?


Well, what else ??

Here is what created that content anyway