Skip to content

Instantly share code, notes, and snippets.

@usr-ein
usr-ein / Dockerfile
Last active May 2, 2024 08:07
Optimal multistaged Dockerfile for poetry
# syntax=docker/dockerfile:1
# Keep this syntax directive! It's used to enable Docker BuildKit
# Based on https://github.com/python-poetry/poetry/discussions/1879?sort=top#discussioncomment-216865
# but I try to keep it updated (see history)
################################
# PYTHON-BASE
# Sets up all our shared environment variables
################################
@vegard
vegard / kernel-dev.md
Last active May 2, 2024 08:05
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

@yspkm
yspkm / NVIDIA Driver, CUDA, and cuDNN Installation Guide for Ubuntu22.04.md
Last active May 2, 2024 08:04
How to use CUDA in Ubuntu (with torch, cupy, cudnn.h + )

NVIDIA Setup Guide: Driver, CUDA, cuDNN & Data Libraries on Ubuntu 22.04

This guide will walk you through the process of setting up NVIDIA drivers, CUDA, cuDNN, and some popular data science libraries on Ubuntu 22.04.

Before You Begin

  • Ensure you have administrative privileges on your computer.
  • Make sure you are connected to the internet.

Installation Steps

@tan9
tan9 / ezlearning.user.js
Last active May 2, 2024 08:02
CHT e-Learning Assistant
// ==UserScript==
// @name CHT e-Learning Assistant
// @source https://gist.github.com/tan9/41686eab8e704bb18885a24339010d65
// @version 0.7.2
// @description Learn with no pain (and hopefully not no gain...)
// @author tan9, danny
// @downloadURL https://gist.githubusercontent.com/tan9/41686eab8e704bb18885a24339010d65/raw/
// @updateURL https://gist.githubusercontent.com/tan9/41686eab8e704bb18885a24339010d65/raw/
// @require https://www.gstatic.com/firebasejs/4.9.0/firebase.js
// @require https://code.jquery.com/jquery-1.12.4.min.js
@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