Skip to content

Instantly share code, notes, and snippets.

@ykazakov
ykazakov / patch-bcm2835-codec.sh
Created March 22, 2021 19:27
Patch rpi3b+ v4l decoder to increase buffer timeouts
#!/bin/sh
# patch bcm2835-codec.ko to increase the buffer timeout
# based on: https://github.com/raspberrypi/linux/issues/3325#issuecomment-684040830
# https://www.raspberrypi.org/documentation/linux/kernel/building.md
# we create a patch in an lxc container to keep the installation clean
set -ex
LXC_IMAGE=images:debian/11/cloud/armhf # base image for LXC container
USER=debian # exsting user with sudo inside the container
CONTAINER=bcm2835-codec-patch
#!/bin/bash
#
# Build gstreamer for Raspberry Pi
# Edit the SRC and DEST environment variables at the top and then
# run this script. You'll need to add the following two envronment
# variables to your .profile
#
# LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PREFIX}/lib"
# PATH="${PATH}:${PREFIX}/bin"
#
@ykazakov
ykazakov / proxy
Created May 4, 2020 10:41 — forked from sheerun/proxy
Automatic SOCKS proxy setup through SSH connection on Mac OS X
# Script for automatic setup of SOCKS proxy through SSH connection.
# It automatically teardowns SOCKS configuration before stopping.
# It's supposed to work on Mac OS X 10.6+
#
# Author: Adam Stankiewicz (@sheerun)
#
[[ -n "$1" ]] || { echo "Usage: proxy user@example.com"; exit 1; }
# get service GUID and NAME (like Wi-Fi) to set SOCKS proxy
@ykazakov
ykazakov / proxy.sh
Last active May 4, 2020 10:41 — forked from slowkow/proxy.sh
Automatic SOCKS proxy setup through SSH connection on Mac OS X
#!/usr/bin/env bash
# Script for automatic setup of SOCKS proxy through SSH connection.
# It automatically teardowns SOCKS configuration before stopping.
# It's supposed to work on Mac OS X 10.6+
#
# Author: Adam Stankiewicz (@sheerun)
#
[[ -n "$1" ]] || { echo "Usage: proxy user@example.com"; exit 1; }
@ykazakov
ykazakov / trigger-appveyor.sh
Last active April 8, 2020 21:49
Trigger AppVeyor builds using the REST API
#!/bin/sh
# Trigger AppVeyor builds using the REST API
# Usage:
# trigger-appveyor.sh [--branch BRANCH] APPVEYORUSER APPVEYORPROJECT AUTHORIZATION_TOKEN
# Based on the example from
# https://www.appveyor.com/docs/api/projects-builds/#start-build-of-branch-most-recent-commit
# Tand on the script trigger-travis.sh from
#!/bin/bash
set -ex
LXC_IMAGE=images:debian/11/cloud/armhf # base image for LXC container
USER=debian # exsting user with sudo inside the container
CONTAINER=gstreamer # the name of the container
[ -n "$1" ] && CONTAINER=$1 # can be set from the command line