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
#!/bin/bash | |
while getopts ":i:o:t:" opt; do | |
case $opt in | |
i) input="$OPTARG" | |
;; | |
o) output="$OPTARG" | |
;; | |
t) text="$OPTARG" | |
;; |
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
#! python3 | |
"""Convert a video to gif with ffmpeg""" | |
import argparse | |
import logging | |
import shlex | |
import shutil | |
import subprocess | |
from pathlib import 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
> pip install pyzmq | |
Collecting pyzmq | |
Using cached https://files.pythonhosted.org/packages/a8/5e/7e4ed045fc1fb7667de4975fe8b6ab6b358b16bcc59e8349c9bd092931b6/pyzmq-18.0.2.tar.gz | |
Installing collected packages: pyzmq | |
Running setup.py install for pyzmq ... error | |
ERROR: Command errored out with exit status 1: | |
command: /tmp/pvenv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6mnvkxwv/pyzmq/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6mnvkxwv/pyzmq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-57y2pv8f/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/pvenv/include/site/python3.8/pyzmq | |
cwd: /tmp/pip-install-6mnvkxwv/pyzmq/ | |
Complete output (558 lines): | |
running install |
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 python3 | |
""" | |
Script to migrate from pipsi to pipx | |
""" | |
from pathlib import Path | |
import os | |
import subprocess | |
from shutil import which |
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
venvhere(){ | |
python3 -m venv venv --prompt $(basename $PWD) && \ | |
source venv/bin/activate && \ | |
pip install -U pip --quiet | |
} |
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
print("pipx is working!") |
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
wget https://download.sublimetext.com/sublime-text_build-3126_amd64.deb | |
sudo dpkg -i sublime-text_build-3126_amd64.deb |
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
// NOTE: this file should be stored at ~/.jshintrc | |
// to see explanation, and full list of options, see jshint/src/options.js | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals that JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |
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
"""Example Django views file to use Google's oauth2 | |
Prequisites: | |
1. You have a the Google+ API enabled at console.developers.google.com | |
2. You have a OAuth 2.0 client ID | |
3. In the Client ID you have authorized | |
- JavaScript origin of http://127.0.0.1:8000 | |
- Redirect URI of http://127.0.0.1:8000/google_callback | |
4. You have downloaded OAuth 2.0 client credentials to google_auth_data.json | |
5. You have a urls that direct requests to googlelogin and to google_callback | |
6. You have run |