Skip to content

Instantly share code, notes, and snippets.

View joshy's full-sized avatar

Joshy Cyriac joshy

  • Universitätsspital Basel
  • Basel
View GitHub Profile
@joshy
joshy / clean.sh
Created July 10, 2020 10:41
delete oldest first directories
# delete oldest first, first 100 entries of directories
ls -lctr | head -n 100 | xargs sudo rm -rf
@joshy
joshy / gist:ee4c2577db82fbf4c5476c0df04a2d31
Created June 4, 2019 13:36
Add result of apply as separate columns to dataframe
df.apply(lambda x: foo(x), axis=1)
# build the damn thing
* python setup.py sdist bdist_wheel
# check
* twine check dist/*
# upload to test.pypi.org and check there
* twine upload --repository testpypi dist/*
# upload for real
@joshy
joshy / gist:58f123fa8601a96f38147a50f89007b3
Created May 14, 2019 14:49
starting matlab network manager
cd /opt/matlab/R2019a/etc
./lmstart
@joshy
joshy / gist:a7ed55dd6e970b85a82c27ab86629765
Created May 8, 2019 16:23
Copy without hidden files and folders
rsync -av --exclude=".*" src dest
@joshy
joshy / backup
Created April 30, 2019 07:31
Backup jupyterhub users
# -r recursive
# -x exclude hidden folders
# -y store symlinks as is and don't follow them
zip -r jupyter-backup.zip jupyter-* -x "*/.*" -y
@joshy
joshy / backup
Created April 30, 2019 07:31
Backup jupyterhub users
# -r recursive
# -x exclude hidden folders
# -y store symlinks as is and don't follow them
zip -r jupyter-backup.zip jupyter-* -x "*/.*" -y
http://peterdowns.com/posts/first-time-with-pypi.html
@joshy
joshy / gist:b884e01bdb5c5ff8af53888c99b13a31
Created January 31, 2018 13:20
remove all *.bak files
find . -name "*.bak" -type f -delete
@joshy
joshy / gist:7e28009937b34776ec254b83e9ad0463
Created January 23, 2018 13:41
TCP listen ports and pids
sudo ss --tcp --listen --numeric --processes