This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reset git repository (before commit) | |
git reset HEAD \* | |
git checkout -- . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to deploy a Django application to Heroku with PostgreSQL | |
#========== Pre-requirements ==========# | |
### 1. make sure Heroku CLI is installed | |
### read more here: https://devcenter.heroku.com/articles/heroku-cli | |
### 2. use virtualenv to control python packages | |
### 3. replace 'projectname' with your project's name throughout this script | |
### 4. this script is for MacOS and Bash, but is very similar for Linux and other shells | |
#========== if you're lazy like me, make an alias ==========# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list all VMSwitches | |
Get-VMSwitch | |
# for each VMSwitch, do the following: | |
Remove-VMSwitch <VM_SWITCH_NAME> | |
# list all NetNATs | |
Get-NetNAT | |
# for each NetNAT, do the following: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start here: https://gist.github.com/wcarhart/48ce5d7e14a8172352db62af9705c183 | |
# Edit the default network adapter settings | |
cd /etc/sysconfig/network-scripts/ifcfg-eth0 | |
# IPADDR can be anything in our range | |
sed -i.bak -e 's/IPADDR = ".*"/IPADDR = "192.168.1.2"/' | |
# GATEWAY needs to match the gateway defined in Hyper-V | |
sed -i.bak -e 's/GATEWAY= ".*"/GATEWAY = "192.168.1.1"/' | |
# Configure DNS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you might need these, if they are not already installed: | |
yum install -y zlib | |
yum install -y zlib-devel | |
yum install -y opensll | |
yum install -y opensll-devel | |
# Install Python 3.6.8 (change version # as necessary) | |
cd /usr/src | |
yum install -y gcc | |
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS IS FOR AN OLDER VERSION OF DOCKER | |
# if you're using a custom docker space on a mounted drive, ensure the drive mounted correctly | |
# determine where the mount is | |
df -h | |
# then, format the disk as necessary (may have to remove partition and remount) | |
fdisk /dev/sda # or /dev/sdb, etc. | |
p # print partitions | |
d # delete partition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ENV_PATH="$(dirname "$(dirname "$(which pip)")")" | |
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)" | |
BAD_ENV_PATHS="/usr/local" | |
echo "Ensure the root of the broken virtualenv:" | |
echo " $ENV_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN apt-get update | |
RUN apt-get install -y octave | |
WORKDIR / | |
ENV SCRIPT="" | |
COPY octave_runner / | |
RUN chmod +x /octave_runner |