This file contains hidden or 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
| import os | |
| from pathlib import Path | |
| import pandas as pd | |
| OUTFILE = 'merged.csv' | |
| ENGINE = 'openpyxl' | |
| cwd = os.getcwd() | |
| p = Path(cwd) |
This file contains hidden or 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
| {% if request.user.is_staff %} | |
| <li class="nav-item"> | |
| <a class="nav-link" href="{% url 'admin:index' %}">{% trans "Admin" %}</a> | |
| </li> | |
| {% endif %} |
This file contains hidden or 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
| net user %username% /DOMAIN | find "Password expires" |
This file contains hidden or 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
| # Get local hostname & IP, add these to Django's ALLOWED_HOSTS | |
| import socket | |
| import netifaces as ni | |
| DEFAULT_INTERFACE = os.getenv('DEFAULT_INTERFACE', default='enp3s4f0') | |
| DEFAULT_IP = ni.ifaddresses(DEFAULT_INTERFACE)[ni.AF_INET][0]['addr'] | |
| DEFAULT_HOSTNAME = socket.gethostname() | |
| ALLOWED_HOSTS = ['localhost', '127.0.0.1', DEFAULT_IP, DEFAULT_HOSTNAME] |
This file contains hidden or 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
| import socket | |
| import netifaces as ni | |
| DEFAULT_INTERFACE = config('DEFAULT_INTERFACE', default='eth0') | |
| DEFAULT_IP = ni.ifaddresses(DEFAULT_INTERFACE)[ni.AF_INET][0]['addr'] | |
| DEFAULT_HOSTNAME = socket.gethostname() | |
| ALLOWED_HOSTS = ['localhost', '127.0.0.1', DEFAULT_IP, DEFAULT_HOSTNAME] |
This file contains hidden or 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
| ### Keybase proof | |
| I hereby claim: | |
| * I am bdunnette on github. | |
| * I am bdunnette (https://keybase.io/bdunnette) on keybase. | |
| * I have a public key ASDIoA4-Rp8zLIKLNq4I_5ea2RXJ6hJydm4uS5sZKrhyFgo | |
| To claim this, I am signing this object: |
This file contains hidden or 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
| net localgroup Administrators Aperio /add | |
| net stop MSSQLSERVER | |
| net stop ApDataService | |
| net start MSSQLSERVER | |
| net start ApDataService | |
| net localgroup Administrators Aperio /delete |
This file contains hidden or 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
| function postToot(text) { | |
| host_instance = 'https://botsin.space' | |
| token = 'your-token-goes-here' | |
| var data = { | |
| 'status': text, | |
| 'visibility' : 'public' | |
| }; | |
| var options = { |
This file contains hidden or 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
| go get -u -v github.com/therecipe/qt/cmd/... | |
| FOR /F "tokens=* USEBACKQ" %%F IN (`go env GOPATH`) DO ( | |
| SET GOPATH=%%F | |
| ) | |
| ECHO %GOPATH% | |
| mkdir %GOPATH%\src\github.com\muesli | |
| cd %GOPATH%\src\github.com\muesli | |
| git clone https://github.com/muesli/telephant.git | |
| cd telephant | |
| go get -u -v |
This file contains hidden or 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
| # Requires both javabridge and python-bioformats: | |
| # pip install python-bioformats | |
| # On e.g. Ubuntu you may need to add JAVA_HOME to /etc/profile: | |
| # JAVA_HOME=/usr/lib/jvm/default-java | |
| # PATH=$PATH:$HOME/bin:$JAVA_HOME/bin | |
| # export JAVA_HOME | |
| # export JRE_HOME | |
| # export PATH |