Skip to content

Instantly share code, notes, and snippets.

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active May 23, 2024 05:07
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@realvjy
realvjy / ChoasLinesShader.metal
Last active May 23, 2024 05:05
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@shibafu528
shibafu528 / gstfix.rb
Created May 23, 2014 10:28
Ruby/Gstを試してみよう
# -*- coding: utf-8 -*-
require "gst"
=begin
Ruby/GStreamer 2.2.0 ruby 2.1.0 上で使用する際に、
Gst.init で例外がスローされ使用することができなくなる不具合を修正します
パッチはすでにGithub上でマージされていますので、
次期バージョン以降はこのモンキーパッチを使用する必要は無くなると期待されます
パッチ引用元:
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 23, 2024 05:00
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eggbean
eggbean / install_scoop.ps1
Last active May 23, 2024 04:57
PowerShell script to install scoop for multi-users and install packages that I use.
# PowerShell script to install scoop for multi-user and packages.
# If scoop is already installed, any additional packages are installed
# and shims are reset in order of the package list.
# Test if Admin
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{ Write-Host "This script requires administrative privileges."; Exit }
# Check if scoop is installed
Function Test-ScoopInstalled {
@savegame
savegame / pulse_sreaming.md
Last active May 23, 2024 04:57
PulseAudio / PipeWire streaming audio from Client to remote PulseAudio / PipeWire Server

We have Server machine, this computer with Headphones, and we have Client computer, this is remote PC with music =) On Server we should first open port for listening connections from Client :

# on ubuntu 
sudo ufw allow from <Client_IP> to any port 4656 proto tcp
# on fedora ( with firewalld ) 
sudo firewall-ctl --add-port 4656/tcp

note: port 4656 just for sample. you can use any port you want
than on Server, from current user add listening for connections

@Neilblaze
Neilblaze / CPP_Template.cpp
Last active May 23, 2024 04:56
CP Template — C++ </>
#include <bits/stdc++.h>
using namespace std;
/* clang-format off */
/* TYPES */
#define ll long long
#define pii pair<int, int>
#define pll pair<long long, long long>
#define vi vector<int>
@darkliquid
darkliquid / !README.md
Last active May 23, 2024 04:55
Script for setting up my windows install. Run setup-windows.ps1

This is my desktop setup scripts for Windows. It installs a number of apps using scoops (in preference) and failing that, via chocolatey. It also makes a number of customisations and streamlining operations to Windows itself via registry changes and various powershell scripts, the most notable of which is the [Windows 10 Debloater][3] script.

After that, It sets up my [WSL][4] environment, and uses my [linux dotfiles repo][5] to customise that. The aim of this setup is to be a reasonably dev-friendly, secure windows environment with a ready-to-go linux environment setup via WSL. More customisations will be made as things like 'controlled folder access exceptions' and other things get discovered through usage.

@tfeldmann
tfeldmann / duplicates.py
Last active May 23, 2024 04:54
Fast duplicate file finder written in python
#!/usr/bin/env python
"""
Fast duplicate file finder.
Usage: duplicates.py <folder> [<folder>...]
Based on https://stackoverflow.com/a/36113168/300783
Modified for Python3 with some small code improvements.
"""
import os
import sys
@hngouveia01
hngouveia01 / debugging_kernel.txt
Last active May 23, 2024 04:54
Debugging kernel code line by line with Qemu and GDB
We are going to use buildroot to download, configure and compile the kernel.
First, download and uncompress buildroot: https://buildroot.org/download.html
Go to the directory and:
make qemu_x86_defconfig
make menuconfig