View publish.py
import paho.mqtt.client as mqtt | |
client = mqtt.Client(protocol=mqtt.MQTTv311) | |
client.connect('iot.eclipse.org', port=1883, keepalive=60) | |
client.publish('update', 'hello world') |
View gist:8ea15ceeae93447f7212
from twisted.web.resource import Resource | |
from twisted.internet import reactor | |
from twisted.web.static import File | |
from twisted.web import server | |
from twisted.application import internet, service | |
from twisted.application.app import startApplication | |
from twisted.web.wsgi import WSGIResource | |
from twisted.runner.procmon import ProcessMonitor | |
from twisted.web import vhost, static |
View daemonset-preloaded.yaml
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: nvidia-driver-installer-cos | |
namespace: kube-system | |
labels: | |
k8s-app: nvidia-driver-installer-cos | |
spec: | |
selector: | |
matchLabels: |
View ffmpeg-scale-npp
ffmpeg \ | |
-vsync 0 \ | |
-hwaccel cuvid -c:v h264_cuvid \ | |
-i https://twitch-event-engineering-public.s3.amazonaws.com/sync-footage/Sync-Footage-V1-H264.mp4 \ | |
-filter_complex " \ | |
[0:v]scale_npp=1280:720[out] | |
" -map '[out]' -y -c:v h264_nvenc -y output.mp4 |
View ffmpeg-blurout.sh
ffmpeg -i source.mp4 -filter_complex \ | |
"[0:v]split=2[base][blurred]; \ | |
[blurred]boxblur=luma_radius=50:chroma_radius=25:luma_power=1[blurred]; \ | |
[blurred]fade=type=in:start_time=5:duration=1:alpha=1[blurred-with-fadein]; \ | |
[base][blurred-with-fadein]overlay[blurout]" \ | |
-map "[blurout]" blurout.mp4 |
View filter-complex-fadein.sh
ffmpeg -i source.mp4 -filter_complex \ | |
"[0:v]fade=type=in:start_time=1:duration=8[fadein]" \ | |
-map "[fadein]" fadein.mp4 |
View filter-complex-blur.sh
ffmpeg -i source.mp4 -filter_complex \ | |
"[0:v]boxblur=luma_radius=10:chroma_radius=10:luma_power=1[blurred]" \ | |
-map "[blurred]" blurred.mp4 |
View filter-complex-split.sh
ffmpeg -i source.mp4 -filter_complex \ | |
"[0:v]split=2[360p][720p]; \ | |
[360p]scale=-2:360[360p]; \ | |
[720p]scale=-2:720[720p]" \ | |
-map "[360p]" 360p.mp4 \ | |
-map "[720p]" 720p.mp4 |
View daemonset.yaml
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
namespace: kube-system | |
name: sysctl | |
spec: | |
selector: | |
matchLabels: | |
app: sysctl | |
template: |
View stunnel.conf
#STUNNEL CONFIG | |
client = yes | |
[postgres-serverB] | |
protocol = pgsql | |
accept = 0.0.0.0:5432 # host:port to listen to on serverA | |
connect = SERVER_B_POSTGRES_HOST:SERVER_B_POSTGRES_PORT | |
options = NO_TICKET | |
retry = yes |
NewerOlder