Some forum posts just want a url... I'm hoping pushing images to this gist will host them effectively ;)
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
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
# Log files | |
*.log |
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 python | |
import sqlite3 | |
def create_connection(db_file): | |
""" create a database connection to the SQLite database | |
specified by the db_file | |
:param db_file: database file | |
:return: Connection object or None | |
""" |
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
#... portion of .bashrc | |
export GIT_PS1_SHOWDIRTYSTATE=true # staged '+', unstaged '*' | |
export GIT_PS1_SHOWUNTRACKEDFILES=true # '%' untracked files | |
export GIT_PS1_SHOWUPSTREAM="auto" # '<' behind, '>' ahead, '<>' diverged, '=' no difference | |
export GIT_PS1_SHOWSTASHSTATE=true # '$' something is stashed | |
function __prompt_command() { | |
local ERRORCODE="$?" |
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
__pycache__ | |
myfile.json |
./test.sh
output is:
FreeCAD 0.17, Libs: 0.17R13522 (Git)
Fasteners workbench Loaded
[
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:16.04 | |
# build-time arguments | |
ARG tester_name=tester | |
ADD . /code | |
WORKDIR /code | |
USER root | |
RUN bash /code/setup.sh |
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
import sys | |
import os | |
import subprocess | |
# Set sync source & destination | |
source_path = "temp/a" | |
dest_path = "temp/b" | |
# Sync: source_path -> mountpoint | |
if sys.platform.startswith('win'): |
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
*.pyc |
NewerOlder