Skip to content

Instantly share code, notes, and snippets.

View vhxs's full-sized avatar
🤔
contemplating

Vikram Saraph vhxs

🤔
contemplating
View GitHub Profile
@masak
masak / explanation.md
Last active July 9, 2024 17:07
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@rxaviers
rxaviers / gist:7360908
Last active July 22, 2024 11:10
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@lukechampine
lukechampine / Y Combinator in Haskell.md
Last active May 20, 2024 14:56
Deriving the Y Combinator in Haskell

The Y Combinator

The Y Combinator is a classic lambda calculus construct that many people find baffling. Here's my attempt to explain it as clearly as possible (no promises!). Familiarity with Haskell syntax is assumed.

The problem we're trying to solve is how to write an anonymous function (a "lambda") that is recursive. Normally, if you want to write a recursive function, it looks like this:

fac n = if n == 0 then 1
        else n * fac (n-1)
@jdblischak
jdblischak / Makefile
Last active September 5, 2023 20:29
Hide supplement but retain cross-referencing with LaTeX
NAME := main
all: $(NAME).pdf
%.pdf: %.tex
sed -i s/'\\includeonly'/'%\\includeonly'/ $(NAME).tex
pdflatex -shell-escape $(NAME)
# Insert additional calls to pdflatex or bibtex here,
# depending on the complexity of your document
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@davmillar
davmillar / email_parse.pl
Last active January 14, 2023 17:15
Puzzle Subscription Email Handler
#!/usr/bin/perl
use MIME::Parser;
use URI::Find;
use File::Fetch;
use HTML::LinkExtractor;
use Data::Dumper;
use File::Copy qw(move);
# Configure path for the output.
my $output_dir = '/home/dmillar/Dropbox/To-Solve/';
@primus852
primus852 / cuda_11.7_installation_on_Ubuntu_22.04
Last active July 13, 2024 10:25 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.7 and cuDNN 8.5 installation on Ubuntu 22.04 for PyTorch 1.12.1
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check