Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
IN_USE=$(mktemp)
ALL_FILES=$(mktemp)
function find_module() {
dir=$(realpath $1)

Install v4l2loopback

git clone git@github.com:umlaeute/v4l2loopback.git make && sudo make install sudo depmod -a

turn it on

sudo modprobe v4l2loopback devices=1 max_buffers=2 exclusive_caps=1 card_label="VirtualCam #0"

Install OBS

..

@fardjad
fardjad / how-to-install-homebrew-on-manjaro.md
Last active May 29, 2024 10:40
[How to Install Homebrew on Manjaro] Steps required to install homebrew on Manjaro Linux #linux #manjaro #homebrew

How to Install Homebrew on Manjaro

Steps

  1. Install base-devel

     pacman -Syu # CAUTION: this updates the whole system
     pacman -S base-devel
    
  2. Run the installer script

@dariodip
dariodip / Dockerfile
Created September 21, 2017 09:45
Cython in a Docker container
FROM python:3.6
WORKDIR /app
ADD . /app
RUN pip install -r requirements.txt
RUN python setup.py build_ext --inplace
ENTRYPOINT ["python"]
CMD ["app.py"]
@kartiksura
kartiksura / main.go
Last active June 7, 2023 16:38
Querying AWS Athena using Golang SDK
package main
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/athena"
)
@weavenet
weavenet / delete_all_object_versions.sh
Created May 4, 2015 05:21
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
@cmackay
cmackay / gist:5863257
Last active January 29, 2024 17:16
AppleScript to save and restore window position and sizes.
-- allSettings is a list of records containing {width:? height:? apps:{{name:? pos:? size:?},...}
-- for each display setup store the apps and their associated position and size
property allSettings : {}
-- create a variable for the current settings
set currentSettings to {}
display dialog "Restore or save window settings?" buttons {"Restore", "Save"} default button "Restore"
set dialogResult to result
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>