Skip to content

Instantly share code, notes, and snippets.

View input
.##.#.#....#.#.#..##..#.#.
#.##.#..#.####.##....##.#.
###.##.##.#.#...#..###....
####.##..###.#.#...####..#
..#####..#.#.#..#######..#
.###..##..###.####.#######
.##..##.###..##.##.....###
#..#..###..##.#...#..####.
....#.#...##.##....#.#..##
..#.#.###.####..##.###.#.#
View main.cpp
#include "pipeline.h"
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
#include <QQuickItem>
#include <QRunnable>
#include <gst/gst.h>
int main(int argc, char *argv[])
{
View dump.vimrc
function! UseBookMode()
LivedownPreview
Goyo
IndentLinesDisable
Limelight
g:saving_at_every_edit = 0
call ToggleSaveEveryEdit()
set linebreak
set wrap
nnoremap j gj
View .aptly.conf
{
"rootDir": "/root/.aptly",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": [],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"dependencyFollowSource": false,
"dependencyVerboseResolve": false,
View .aptly.conf
{
"rootDir": "/root/.aptly",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": [],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"dependencyFollowSource": false,
"dependencyVerboseResolve": false,
View Dockerfile
FROM debian:buster
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y aptly
RUN apt-get install -y apt-transport-s3
RUN apt-get install -y gpg
RUN mkdir /root/.gnupg
View src-test.py
import cv2
cap = cv2.VideoCapture(0)
fourcc = cv2.VideoWriter_fourcc(*'MJPG')
out = cv2.VideoWriter('appsrc ! videoconvert ! gtksink',
fourcc, 20.0, (640, 480))
while cap.isOpened():
ret, frame = cap.read()
View client.js
/* eslint-env browser */
/* global start, out */
const ws = new WebSocket('ws://localhost:7070');
const log = msg => out.textContent += `\n${msg}`;
const send = obj => ws.send(JSON.stringify(obj));
ws.onopen = () => log('connection established');
ws.onmessage = (msg) => {
View TodoInput.qml
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
Item {
id: root
signal add(string todo)
property var model
RowLayout {
View index.html
<canvas id=c></canvas>
<p>Calculating and prerendering...</p>
You can’t perform that action at this time.