Skip to content

Instantly share code, notes, and snippets.

@shamil
shamil / mount_qcow2.md
Last active November 23, 2024 11:53
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@mlogix
mlogix / A_UUID_v7_for_Postgres.sql
Created November 16, 2024 17:02 — forked from kjmph/A_UUID_v7_for_Postgres.sql
Postgres PL/pgSQL function for UUID v7 and a bonus custom UUID v8 to support microsecond precision as well. Read more here: https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/
create or replace function uuid_generate_v7()
returns uuid
as $$
begin
-- use random v4 uuid as starting point (which has the same variant we need)
-- then overlay timestamp
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string
return encode(
@niksumeiko
niksumeiko / git.migrate
Last active November 23, 2024 11:48
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Last active November 23, 2024 11:46 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6. Forked from @fabianoriccardi

Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@leonardofed
leonardofed / README.md
Last active November 23, 2024 11:43
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@antonisa
antonisa / SAC.md
Last active November 23, 2024 11:41
Conference Decisions

The Impossible Task of Conference SACs/PCs or How I lost 3 Nights of Sleep

I am writing this post in order to share my thoughts on the processes behind acceptance/rejection decisions in top-tier (NLP) conferences. I'll first discuss the process and then share some thoughts on its shortcomings.

Before we start, a bit about me. I am an assistant professor (aka, rather junior: I have been in this position for less than 4 years, following my PhD studies and a short postdoc) working on NLP, with a focus on multilingualism and low-resource settings. While I have submitted, published at, and reviewed for *ACL conferences and workshops for many years, it was at EMNLP'23 that I was a Senior Area Chair (SAC) for the first time.

The Conference Paper Pipeline

Let's first briefly outline the process that a paper undergoes, from submission to decision:

@redbar0n
redbar0n / snake_case-vs-kebab-case-vs-camelCase
Last active November 23, 2024 11:39
snake_case-vs-kebab-case-vs-camelCase
// The following is an example from the language Kitten, but generalizes to other languages.
// It should be useful for language design and choosing naming conventions for variables and functions.
// TL;DR: camelCase is most readable/discernable when used in context, as per this simple example extract:
`n bottles-of-beer on-the-wall` // kebab-case
`n bottles_of_beer on_the_wall` // snake_case
`n bottlesOfBeer onTheWall` // camelCase
// To more fully see the effect yourself, in context, do the following:
@kippuga
kippuga / README.md
Last active November 23, 2024 11:35
Thrustmaster T.A.R.G.E.T configuration script for my TCA Officer Pack HOTAS. This is meant to serve as an example script or something to base your own script on.

To keep the script profile running after you close the editor, click on "OPTIONS" and make sure the "DO NOT STOP SCRIPT WHEN THE EDITOR EXITS" option is checked like so – https://imgur.com/UZNHfsc

@unitycoder
unitycoder / OptimalSpatialHashing.cs
Created October 6, 2024 14:16 — forked from adammyhre/OptimalSpatialHashing.cs
Unity Spatial Hashing with Jobs and Burst
using System;
using Unity.Burst;
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class OptimalSpatialHashing : MonoBehaviour {
@unitycoder
unitycoder / VertexBillboard.shader
Created September 4, 2024 21:49 — forked from camnewnham/VertexBillboard.shader
Point cloud shaders
Shader "Points/Billboard"
{
Properties
{
_PointSize("PointSize", Range(0, 0.1)) = 0.01
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend("Source Blend", Float) = 1 // "One"
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend("Destination Blend", Float) = 0 // "Zero"
[Enum(UnityEngine.Rendering.CompareFunction)] _ZTest("Depth Test", Float) = 4 // "LessEqual"
[Enum(DepthWrite)] _ZWrite("Depth Write", Float) = 1 // "On"
}