Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / cache_example.py
Last active October 7, 2019 19:59 — forked from treuille/cache_example.py
This demonstrates the st.cache function
#!/usr/bin/env python3
# USAGE
"""
From @treuille:
pip install --upgrade streamlit
streamlit run https://gist.githubusercontent.com/pythoninthegrass/b75d39158f42722a9c25871f8aa4fd20/raw/2019640b6a9ff5da5ab6d5b11b3345ddc764b285/cache_example.py
"""
import streamlit as st
#!/usr/bin/env bash
# SOURCE: https://gist.github.com/CraigLindsey/16ee404f132dbc38f7e83c30d108400b
# activate verbose standard output (stdout)
set -v
# activate debugging (execution shown)
set -x
# logs
@pythoninthegrass
pythoninthegrass / install_chromedriver.sh
Last active March 11, 2020 00:57 — forked from natritmeyer/install_chromedriver.sh
Install chromedriver on fedora
#!/usr/bin/env bash
logged_in_user=$(logname)
cd "/home/$logged_in_user/Downloads"
url='https://chromedriver.storage.googleapis.com/80.0.3987.16/chromedriver_linux64.zip'
curl -LJO "$url"
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriver
sudo chown root /usr/bin/chromedriver
sudo chmod +x /usr/bin/chromedriver
#!/usr/bin/env bash
# SOURCE:
# https://gist.github.com/pythoninthegrass/ca8074951cf32a6a064bda7e31b03d60
# activate verbose standard output (stdout)
set -v
# activate debugging (execution shown)
set -x
@pythoninthegrass
pythoninthegrass / jamfpro-docker-compose.yml
Created March 19, 2020 01:48 — forked from brysontyrrell/jamfpro-docker-compose.yml
A Docker Compose file for launching Jamf Pro
version: "3"
services:
mysql:
image: "mysql:5.7"
networks:
- jamfnet
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: "jamfsw03"
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@pythoninthegrass
pythoninthegrass / reinit-sound.sh
Created March 25, 2020 21:37 — forked from akorobov/reinit-sound.sh
Fix(audio subsystem reinitialization) for no sound in osx 10.9(.2?) after sleep with headphones in
sudo kextunload /System/Library/Extensions/AppleHDA.kext
sudo kextload /System/Library/Extensions/AppleHDA.kext
sudo killall -9 coreaudiod
@pythoninthegrass
pythoninthegrass / scp-aws.md
Created March 25, 2020 22:52 — forked from stephaniemdavis/scp-aws.md
Syntax for using scp to to download a file from AWS to local disk

The following line uses the secure copy protocol to copy a file from an aws instance to the current (".") folder of a local machine.

scp -i aws.pem username@awsip(or ALIAS):/path/to/file .

aws.pem is the key AWS provides you to gain access to the AWS instance you want to copy from.

awsip is the IP address or DNS alias of the AWS instance.

path/to/file is the file's path on aws.

It is extremely important to add the period after the /path/to/file. Note the blank space between the /path/to/file and the period.

https://stackoverflow.com/questions/9441008/how-can-i-download-a-file-from-ec2

The obverse is true too; to upload FROM local folder to aws:

@pythoninthegrass
pythoninthegrass / scp-aws.md
Created March 25, 2020 22:52 — forked from stephaniemdavis/scp-aws.md
Syntax for using scp to to download a file from AWS to local disk

The following line uses the secure copy protocol to copy a file from an aws instance to the current (".") folder of a local machine.

scp -i aws.pem username@awsip(or ALIAS):/path/to/file .

aws.pem is the key AWS provides you to gain access to the AWS instance you want to copy from.

awsip is the IP address or DNS alias of the AWS instance.

path/to/file is the file's path on aws.

It is extremely important to add the period after the /path/to/file. Note the blank space between the /path/to/file and the period.

https://stackoverflow.com/questions/9441008/how-can-i-download-a-file-from-ec2

The obverse is true too; to upload FROM local folder to aws: