Skip to content

Instantly share code, notes, and snippets.

@jbenua
jbenua / postgres_query_planner_emulation.py
Created March 18, 2024 18:49
Emulate how postgres query planner works: choose the quickest method from the range
from multiprocessing import get_context
from multiprocessing.connection import wait
import time
from functools import partial
import random
# we need to share the context of the parent process
# otherwise child processes will have no idea, what our `runner` is
ctx = get_context("fork")
@brotherkaif
brotherkaif / settings.json
Created September 12, 2023 17:19
LazyVim keymappings for VSCode
{
"vim.showMarksInGutter": false,
"vim.foldfix": true,
"vim.surround": true,
"vim.easymotion": true,
"vim.easymotionKeys": "asdghklqwertyuiopzxcvbnmfj",
"vim.leader": "<space>",
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [":", "w", "<CR>"],
@zodman
zodman / bluetooth.ps1
Last active March 19, 2024 09:57
Enable and disable bluetooth windows by powershell cli ! usefull to sync you airphones
[CmdletBinding()] Param (
[Parameter(Mandatory=$true)][ValidateSet('Off', 'On')][string]$BluetoothStatus
)
If ((Get-Service bthserv).Status -eq 'Stopped') { Start-Service bthserv }
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]
Function Await($WinRtTask, $ResultType) {
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
$netTask = $asTask.Invoke($null, @($WinRtTask))
$netTask.Wait(-1) | Out-Null
@veekaybee
veekaybee / normcore-llm.md
Last active March 19, 2024 09:54
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@ejdyksen
ejdyksen / patch-edid.md
Last active March 19, 2024 09:53
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

@ofhouse
ofhouse / install-java-versions.md
Created October 13, 2020 15:16
Install and manage multiple Java SDK versions on Ubuntu

Install and manage multiple Java versions on Ubuntu

This guide shows per example the installation of the Java SDK versions 8 (LTS, already installed) and 11 (LTS).

1. Check which Java versions are avaialable or already installed

apt --names-only search "openjdk-.*jre$"

> Sorting... Done
@lmammino
lmammino / README.md
Last active March 19, 2024 09:52
Setup SSM to connect your VSCode to a remote Cloud9 Instance (awsbites.com)

Initial steps

  1. Launch Cloud9 IDE with SSM option
  2. When it launchers, open the Cloud9 IDE in the AWS Console

With SSM

Install:

  • AWS CLI
@ariok
ariok / EnvQueryGenerator_GridOffset.cpp
Created June 1, 2019 10:17
Custom UE4 EQS Generators
// Fill out your copyright notice in the Description page of Project Settings.
#include "EnvQueryGenerator_GridOffset.h"
#include "AI/Navigation/NavigationTypes.h"
#include "EnvironmentQuery/Contexts/EnvQueryContext_Querier.h"
#define LOCTEXT_NAMESPACE "EnvQueryGenerator"
UEnvQueryGenerator_GridOffset::UEnvQueryGenerator_GridOffset()
{
===============================================================================
For Adding Any Appllication in Android Source
===============================================================================
For : TestApp
Create TestApp directory into below path
vendor/<vendor>/proprietary/prebuilt/target/product/<device>/system/app/
cd vendor/<vendor>/proprietary/prebuilt/target/product/<device>/system/app/
@MichaelCurrin
MichaelCurrin / README.md
Last active March 19, 2024 09:48
Recommended VS Code extensions

Recommended VS Code extensions

Extensions I use or want to use in VS Code.

I add links and explanations so you can use them too if you want.

Language and tool-specific support

Such as syntax highlighting and linting.