Skip to content

Instantly share code, notes, and snippets.

@pksunkara
pksunkara / config
Last active October 23, 2025 13:41
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
# vi: ft=dosini
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[column]
@lateau
lateau / late-night-theme.el
Last active September 22, 2025 01:28
Late Night Theme for Emacs24: Color theme by Alex Schroeder, created 2003-08-07. This theme is for use late at night, with only little light in the room. The goal was to make something as dark and subtle as the text console in its default 80x25 state -- dark grey on black.
;;; late-night-theme.el --- Late Night theme for Emacs 24
;; Author: Alex Schroeder
;; Maintainer: Daehyub Kim <lateau at gmail.com>
;; URL: https://gist.github.com/4420862
;; Version: 0.0
;; Keywords: theme, color
;;; Commentary:
@willurd
willurd / web-servers.md
Last active October 26, 2025 20:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
(*
RecursiveTypesAndFold-2.fsx
Related blog post: http://fsharpforfunandprofit.com/posts/recursive-types-and-folds-2/
*)
// ==============================================
// PART 2 - Introducing Folds
// ==============================================
@jtpaasch
jtpaasch / Ocaml-Systems-Programming.md
Created July 5, 2018 14:28
Notes/tutorial on systems programming in OCaml.

OCaml Systems Programming

Including the unix module

To compile

Compile your modules first, e.g.:

@thealmarty
thealmarty / iterate.ml
Last active January 23, 2025 02:32
Iterate function using unfold in OCaml
(* The unfold function takes in
a predicate (p) and
a function (g) which takes an input (b). *)
let rec unfold p g b =
if p b then [] else
(match g b with (a, bprime) ->
a :: unfold p g bprime)
;;
(* The iterate function takes in a function (f),
@petelacey
petelacey / Dockerfile
Last active April 7, 2025 01:02
Docker Compose setup for Elixir, Phoenix, and Postgres
FROM elixir:latest
# Install debian packages
RUN apt-get update && \
apt-get install --yes build-essential inotify-tools postgresql-client git && \
apt-get clean
ADD . /app
# Install Phoenix packages
@mschwaig
mschwaig / sway.nix
Last active May 4, 2025 08:47
Configure sway as the window manager for NixOS with gdm as the display manager
{ config, pkgs, lib, ... }:
{
# This sway config is mostly based on https://nixos.wiki/wiki/Sway
# which integrates sway with systemd in the style described here
# https://github.com/swaywm/sway/wiki/Systemd-integration
# and the replies in https://github.com/NixOS/nixpkgs/issues/57602
# with some individual packages added/removed and using sddm as the display manager.
#
# Take care to start the correct target as described by the sway proejct wiki.
@ekickx
ekickx / rc.xml
Last active June 11, 2024 01:48
labwc sample conf
<?xml version="1.0" encoding="UTF-8"?>
<openbox_config>
<keyboard>
<keybind key="XF86AudioMute">
<action name="Execute">
<command>bash ~/Projects/bin/volume mute</command>
</action>
</keybind>
<keybind key="XF86AudioRaiseVolume">
@DrSensor
DrSensor / desktop.nix
Last active June 11, 2024 01:48
My plan for full migration into NixOS and Wayland
{ pkgs ? import <nixpkgs>
, lib ? pkgs.lib
, desktopEnvironment
}: with pkgs;
desktopEnvironment {
session-manager = emptty;
window-manager = [ sway labwc ];
screen-display = {
use = kanshi; # autorandr
gui = wlay;