Skip to content

Instantly share code, notes, and snippets.

View MVesuviusC's full-sized avatar

Matt Cannon MVesuviusC

View GitHub Profile
@MVesuviusC
MVesuviusC / bash_loop_through_file_by_line.txt
Last active April 7, 2022 19:34
Bash - Loop through file line by line
while read line
do
echo "$line"
done < misc/inputfile.txt
@MVesuviusC
MVesuviusC / ggplot_bits
Last active April 19, 2022 13:18
random ggplot snippets
theme_set(theme_bw())
+ theme(axis.text.x = element_text(angle = 90, hjust = 1))
+ theme(legend.position = "none")
+ theme_update(plot.title = element_text(hjust = 0.5))
If ggsave is slow, try:
options(bitmaptype = "cairo")
@MVesuviusC
MVesuviusC / smbclient
Last active December 11, 2023 18:37
commands to run smbclient
smbclient //researchshare/RESTheisen -W research -U mvc002
smbclient //igmdata/igm_roberts -W research -U mvc002
If gcc error: ml purge
# sometimes get this error:
[mvc002@r1pl-hpcf-log01 Counts_2]$ smbclient //igmdata/igm_roberts_osu -W research -U mvc002
Password for [RESEARCH\mvc002]:
@MVesuviusC
MVesuviusC / vscode automatic login.txt
Last active August 18, 2023 16:06
vscode automatic login
vscode auto login
From:
https://stackoverflow.com/questions/66113731/how-to-save-ssh-password-to-vscode
on local machine (windows) in powershell run:
# Change my pathway to your username #
ssh-keygen -q -b 2048 -f /Users/mvc002/.ssh/keys/franklin_rsa -t rsa
hit enter twice to skip entering a password
make new contents of the folder inherit group from parent directory
chmod g+s folder
https://www.redhat.com/sysadmin/suid-sgid-sticky-bit
find . -user mvc002 -group gdlessnicklab | xargs chown -v -h mvc002:gdrobertslab
@MVesuviusC
MVesuviusC / git_credentials.txt
Last active April 19, 2022 13:24
save git credentials
git save credentials temporarily
# Store info for a day
# after you put it in once it remembers it for a day
git config --global credential.helper "cache --timeout=86400"
usethis::create_github_token()
# Use the website to set up the github personal access token (PAT)
# Copy the PAT somewhere so you don't forget it
@MVesuviusC
MVesuviusC / git_history.txt
Created April 19, 2022 13:16
changing git history
If you have any other choice whatsoever, just don't....
git changing history
# View file size in commits
git ls-tree -r --long c433c76cc37621189d349595adb758d54769142e
# update first commit
git rebase -i --root
@MVesuviusC
MVesuviusC / conda.txt
Last active June 27, 2023 20:05
conda environments bits
conda environments
export PATH="/gpfs0/export/apps/easybuild/software/Miniconda3/4.7.10/bin:$PATH"
Package from: https://github.com/PacificBiosciences/pbbioconda
conda create -n isoseq python=2.7
eval "$(conda shell.bash hook)"
@MVesuviusC
MVesuviusC / perl_modules.txt
Created April 19, 2022 13:19
perl modules
perl install modules
cpanm [name of package]
@MVesuviusC
MVesuviusC / dnanexus_app_build.txt
Created April 19, 2022 13:20
DNAnexus app building
DNAnexus app building
source ~/virtualEnvs/dnanexus/bin/activate
dx login # login to server, choose which project to attach to
dx build # build app from the json and associated file(s)
deactivate