Skip to content

Instantly share code, notes, and snippets.

View sumeet's full-sized avatar

Sumeet Agarwal sumeet

  • San Francisco, CA
View GitHub Profile
@NaimKabir
NaimKabir / sfcommons_dinner.ipynb
Created January 28, 2023 03:47
Naive method used to create dinner matches for SF Commons
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MateusRodCosta
MateusRodCosta / Improved Microphone (Male voices, with Noise Reduction).json
Last active June 9, 2024 09:40
An EasyEffects preset created for input devices (intended for Microphones). Please read the README.md.
{
"input": {
"blocklist": [],
"compressor": {
"attack": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"hpf-frequency": 10.0,
"hpf-mode": "off",
"input-gain": 0.0,
@ecthiender
ecthiender / doom_emacs_for_haskell.md
Last active June 7, 2024 04:28
Step by step instructions to setup doom emacs for Haskell + Haskell Language Server (LSP)

Install doom emacs

git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
cd ~/.emacs.d
bin/doom install

Optional

@tyler-dot-earth
tyler-dot-earth / logid.cfg
Last active October 13, 2023 07:50
Logiops (Linux driver) configuration example for Logitech MX Master 3. Includes gestures, smartshift, DPI. Tested on logid v0.2.2-35-g1c209ed. File location: `/etc/logid.cfg`
// Logiops (Linux driver) configuration for Logitech MX Master 3.
// Includes gestures, smartshift, DPI.
// Tested on logid v0.2.2-35-g1c209ed.
// File location: /etc/logid.cfg
devices: ({
name: "Wireless Mouse MX Master 3";
smartshift: {
@zesterer
zesterer / infer.rs
Created May 14, 2020 21:28
Type Inference in 66 lines of Rust
use std::collections::HashMap;
#[derive(Debug)]
enum Type {
Num,
Bool,
List(Box<Type>),
Func(Box<Type>, Box<Type>),
}
@gusmacaulay
gusmacaulay / shell.nix
Last active January 1, 2024 10:57 — forked from lightdiscord/shell.nix
Postgresql/Postgis inside nix-shell with sqitch and default postgres user
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "postgresql-inside-nixshell";
buildInputs = [
glibcLocales
(pkgs.postgresql.withPackages (p: [ p.postgis ]))
sqitchPg
pgcli
@rust-play
rust-play / playground.rs
Created December 3, 2018 05:25
Code shared from the Rust Playground
struct Assignment {}
enum CodeNode {
Assignment(Assignment),
}
enum CodeNodeRef<'a> {
Assignment(&'a Assignment),
}
impl<'a> From<&'a Assignment> for CodeNodeRef<'a> {
fn from(x: &'a Assignment) -> Self {
CodeNodeRef::Assignment(x)
#!/usr/bin/sh
# which window to be warped to
dir=$1
fwid=$(bspc query -N -n $dir)
if [ -n "$fwid" ] ; then
wattr wh $fwid | {
read width height
@rvega
rvega / main.cpp
Created April 9, 2018 02:07
Rendering video content with libvlc to an openGL texture.
#include <mutex>
#include <vlc/vlc.h>
#include <stb_image.h>
#include <nanogui/nanogui.h>
class VideoView: public nanogui::GLCanvas {
public:
nanogui::GLShader shader;
GLuint textureId;
@david-sanabria
david-sanabria / pg_base62_encode.sql
Last active March 28, 2024 11:08
Base62 Encode/Decode functions for PostgreSQL.
/*
* This script will create base62_encode() and base62_decode() in the current schema of a postgresql database.
* Give it a star if you find it useful.
*/
CREATE OR REPLACE FUNCTION base62_encode( long_number bigint )
RETURNS text
AS $BODY$
/*
* base62_encode()