Skip to content

Instantly share code, notes, and snippets.

@nitheeshkl
nitheeshkl / gige_gst_v4l.md
Last active May 2, 2024 08:02
Gstreamer pipelines to use GigE cams as webcam for Zoom/Teams/Skype

Using GigE cam as webcam for Zoom/Skype/Teams

TL;DR: Creates a Gstreamer pipeline to read camera frames from a GigE camera, using Aravis library, and publish them as V4l2 camera source, using V4l2loopback, that can be read by video conferencing programs like Zoom/Skype/Teams.

gst-launch-1.0 aravissrc blocksize=5013504 h-binning=1 v-binning=1 ! video/x-bayer,format=rggb,framerate=100/5,width=2448,height=2048 ! bayer2rgb ! video/x-raw,format=RGBx ! videoconvert ! video/x-raw,format=YUY2 !  aspectratiocrop aspect-ratio=16/9 ! videoscale ! video/x-raw,width=1280,height=720 ! queue ! v4l2sink device=/dev/video0

The Basics

@mvaisakh
mvaisakh / Bringup.md
Last active May 2, 2024 08:01
An Android Device Tree Bringup Guide

A small Device Tree Bringup Guide

Introduction

So, you guys might be wondering, how do these "Developers" get your favourite Custom roms, such as LineageOS, Paranoid Android etc., to their own devices. Well I'm here to Guide you on how to do it, specifically on how to bringup or make your own device tree from scratch or adapting.

Gist of this Guide: This is for people with genuine interest in Android OS porting/development. After going through this guide, you should be able to do a total device tree bringup on your own.

Prerequisite: Certain requirements are to be met before you start with this amazing journey.

@nyancodeid
nyancodeid / README.md
Last active May 2, 2024 07:58
Make RESTful API with Google Apps Script and SpreadSheet

Google Script CRUD

By Ryan Aunur Rassyid

Simply create RESTful API with Google Script and store it to Google SpreadSheet like a Pro.

@ropp5pop
ropp5pop / ropp01.nss
Last active May 2, 2024 07:56
My main Config files for Nilesoft Shell. WIP after updates.
// Ropp's main config
// https://nilesoft.org/docs/functions/id
// Cheatsheet:
// Types: file|dir|drive|usb|dvd|fixed|vhd|removable|remote|back|desktop|namespace|computer|recyclebin|taskbar
// remove... mod etc
// multiple remove (find="view|sort|paste")
// all not equal to remove(where=this.name!="shit")
// type is file only remove (type="file" find="run as admin")
// modify( find = value [property = value [...] ])
//
@forstie
forstie / Query Spooled File contents for a specific user.sql
Last active May 2, 2024 07:55
Query Spooled File contents for a specific user
--
-- description: What spooled files does the current user own?
--
select job_name, spooled_file_name, file_number, user_data,
create_timestamp
from qsys2.output_queue_entries_basic
where user_name = user;
stop;
--
-- description: Query the contents of RUNSQLSTM spooled files for the current user
@forstie
forstie / Dates and TIMESTAMP_FORMAT
Last active May 2, 2024 07:55
Formatting date data into true date and time date types
-- Author: Scott Forstie
-- Email: forstie@us.ibm.com
create or replace variable coolstuff.decdate dec(6,0);
set coolstuff.decdate = '190718';
-- July 18, 2019 (yes, really!)
values timestamp_format(varchar(coolstuff.decdate), 'YYMMDD');
-- Wow
-- Yowza
@mattrefghi
mattrefghi / cwebp-all-files-in-folder.bat
Created December 8, 2023 20:47
This is a fairly dumb batch file that, when placed in a folder, will run Google's cwebp.exe (https://developers.google.com/speed/webp/docs/precompiled) against all .jpg files in the same folder as the script. Could be a lot smarter, but it did the trick, figured it could be a good starting point for someone else.
@echo off
set /a counter=0
for %%f in (*.jpg) do (
C:\libwebp\bin\cwebp.exe -q 80 %%f -o %%~nf.webp
set /A counter=counter+1
)
echo ************************************
@aferriss
aferriss / levels.glsl
Created April 26, 2017 23:20
GLSL Photoshop Style Levels Adjustment
vec3 gammaCorrect(vec3 color, float gamma){
return pow(color, vec3(1.0/gamma));
}
vec3 levelRange(vec3 color, float minInput, float maxInput){
return min(max(color - vec3(minInput), vec3(0.0)) / (vec3(maxInput) - vec3(minInput)), vec3(1.0));
}
vec3 finalLevels(vec3 color, float minInput, float gamma, float maxInput){
return gammaCorrect(levelRange(color, minInput, maxInput), gamma);
@forstie
forstie / JSON_TABLE and survival tips for shredding JSON with SQL
Last active May 2, 2024 07:55
This example shows how to overcome what seems to be commonplace: JSON Web Services that return an invalid JSON document.
-- This fails to return data....why?
SELECT cusip, issueDate, bidToCoverRatio
FROM JSON_TABLE(
SYSTOOLS.HTTPGETCLOB('https://www.treasurydirect.gov/TA_WS/securities/announced?format=json&type=FRN&pagesize=5', null),
'$.root[*]'
COLUMNS(cusip VARCHAR(10) PATH '$.cusip',
issueDate Timestamp PATH '$.issueDate',
bidToCoverRatio double PATH '$.bidToCoverRatio')
) AS X;
stop;
@forstie
forstie / Generating spreadsheets with SQL.sql
Last active May 2, 2024 07:54
In this working example, we establish an SQL table which contains the spreadsheets we'd like to have generated. Each row in the table includes the query that will supply the data for the spreadsheet, and the location in the IFS where the spreadsheet should reside. Further, a different procedure emails the spreadsheets to an interested consumer. …
-- =================================================================
-- Author: Scott Forstie
-- Email : forstie@us.ibm.com
-- Date : January 10, 2020
-- =================================================================
--
-- Setup:
-- 1) create and populate the spreadsheet generator table
-- 2) change the procedure source code: