Skip to content

Instantly share code, notes, and snippets.

View gwbischof's full-sized avatar
🧐
Learning

Garrett Bischof gwbischof

🧐
Learning
View GitHub Profile
@danielballan
danielballan / README.md
Last active May 12, 2020 02:12
Container Builder for NSLS-II JupyterHub at SDCC

Initial setup of Docker worker VM

Start the Docker daemon and a local Docker registry.

sudo systemctl start docker
sudo docker run -d -p 5000:5000 --restart=always --name registry registry:2

Place repo2singularity (see file in this gist) in /usr/bin/ or somewhere on the PATH.

@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@Mohammed-Sunasra
Mohammed-Sunasra / supervisor.conf
Created December 30, 2018 07:08
Supervisor Configuration with Conda Python environment
[program:{program_name}]
directory=/home/{project_name}/api/falcon_api/app
environment=PATH=/home/anaconda3/envs/{env_name}/bin
command=/home/anaconda3/envs/{env_name}/bin/gunicorn app:api -b 0.0.0.0
autostart=true
autorestart=true
stderr_logfile=/var/log/{project_name}/{filename}.err.log
stdout_logfile=/var/log/{project_name}/{filename}.out.log
NOTE:
@ww9
ww9 / gist_blog.md
Last active January 12, 2024 23:00
Using Gist as a blog #blog

Blogging with Gist

Gist simplicity can turn blogging into a liberating experience.

Pros Cons
✅ Free, simple, fast, hassle-free ❌ Image upload in comments only
✅ Tagging ❌ No post pinning
✅ Search ❌ Doesn't look like a blog
✅ Revisions ❌ Unfriendly URLs
@zenorocha
zenorocha / basic.md
Last active March 26, 2023 09:00
New Firebase Auth vs Old Firebase Auth
@tomysmile
tomysmile / mac-setup-redis.md
Last active March 18, 2024 22:12
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@malev
malev / Vagrantfile
Last active September 9, 2020 21:37
Vagrantfile: Ubuntu with miniconda 2 installed and working
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", inline: <<-SHELL
apt-get update -q
su - vagrant
wget -q https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b -p /home/vagrant/miniconda
echo 'export PATH="/home/vagrant/miniconda/bin:$PATH"' >> /home/vagrant/.bashrc
@kwmiebach
kwmiebach / pytest.md
Last active April 28, 2024 22:34 — forked from amatellanes/pytest.sh
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)