Skip to content

Instantly share code, notes, and snippets.

@fjctp
fjctp / README.md
Last active October 29, 2018 02:48
Run RancherOS in Hyper-V
@fjctp
fjctp / subprocess-video-conversion.py
Created April 1, 2018 21:40
transcode with python subprocess
#!/usr/bin/python3
import os.path
from time import ctime
from multiprocessing import Pool
from subprocess import call
# Define variables
HOME = "/home/pi/workplace"
BIN = os.path.join(HOME, "bin")
PY = os.path.join(HOME, "py")
@fjctp
fjctp / asyncio-forever-loop.py
Created April 1, 2018 21:38
asyncio and subprocess
#!/usr/bin/env python
import asyncio
import logging
async def periodic_worker(loop):
wait_sec = 1.0
while True:
t0 = loop.time()
await asyncio.sleep(wait_sec)
@fjctp
fjctp / install.sh
Created February 20, 2018 03:04
pychromecast
# install pychromecast
pip install pychromecast
# get a patch for YOUTUBE CONTROLLER to work
wget -O PYTHON_DIR/LIB/site-packages/pychromecast/pychromecast/controllers/youtube.py \
https://github.com/ur1katz/pychromecast/raw/master/pychromecast/controllers/youtube.py
@fjctp
fjctp / Dockerfile
Last active November 29, 2017 05:14
Simple Nodejs Server
FROM node:alpine
COPY server.js /
EXPOSE 80
ENTRYPOINT ["node", "/server.js"]