Skip to content

Instantly share code, notes, and snippets.

View mehdisadeghi's full-sized avatar

mehdisadeghi

View GitHub Profile
@mehdisadeghi
mehdisadeghi / byobu
Created October 2, 2017 11:58
Byobu startup file
#!/bin/bash
if [ -z "$(byobu list-sessions | grep code)" ]
then
byobu-tmux new-session -d #-t code # creates a new detached Byobu session
# Jupyter Window
byobu-tmux rename-window jupyter # Byobu comes up with one window, so rename that
byobu-tmux send-keys -t 0 'zsh' 'C-m'
byobu-tmux send-keys -t 0 'PYTHONHOME=$HOME jupyter notebook --no-browser --ip pc-p561' 'C-m'
@mehdisadeghi
mehdisadeghi / gist:7b17a8eb5d5db2ae8de722d469d4a174
Created August 16, 2018 14:05
serverless-package-python-functions patch for pip upgrade and aws invoke local
121a122,124
> this.log('Upgrading pip inside the container.')
> this.runProcess('docker', ['exec', this.containerName, 'pip', 'install', '--upgrade', 'pip'])
> this.log('Pip upgrade finished.')
166a170,187
> loadEnvVars() {
> let pythonPath = ''
> if (this.globalIncludes) {
> this.log(`Adding global includes to the python path: ${this.globalIncludes}`)
> pythonPath += `:${this.globalIncludes}`