This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.5.1..3.28) | |
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) | |
set(CMAKE_DISABLE_SOURCE_CHANGES ON) | |
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") | |
message(FATAL_ERROR "In-source builds are not allowed.") | |
endif() | |
project( | |
ProjectName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -Uz +X compinit && compinit && autoload -Uz +X bashcompinit && bashcompinit && compgen -ac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# pylint: disable=missing-function-docstring,invalid-name | |
""" | |
github-repos.py | |
Iterate through usernames and get their GitHub repos. | |
""" | |
from itertools import count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from typing import TypedDict | |
from datetime import datetime, timedelta | |
from json import load | |
class Session(TypedDict): | |
"""One session info.""" | |
duration: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
memusg() { /nix/store/*-time-*/bin/time -v "$@" 2> >(grep 'Maximum resident set size'); } |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- I was recently asked what license this code is under. Since it is fairly trivial code, | |
I don't really feel it "deserves" a "real" license, so I am hereby placing it in the public domain. | |
In countries where this is not posible, I am placing it under Creative Commons CC0 | |
(https://creativecommons.org/publicdomain/zero/1.0/), which is basically just a more formal way of | |
putting it in the public domain for people who like to be sure. | |
If you want to credit me anyway, that is of course fine with me :) --> | |
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="renderDiv" style='font-family:"Lucida Console", Monaco, monospace' /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
moz_overlay = import (builtins.fetchTarball | |
"https://github.com/oxalica/rust-overlay/archive/master.tar.gz"); | |
nixpkgs = import <nixpkgs> { overlays = [ moz_overlay ]; }; | |
in { pkgs ? nixpkgs }: | |
pkgs.mkShell { | |
name = "rust env"; | |
buildInputs = with pkgs; [ | |
(rust-bin.stable.latest.default.override { | |
# extensions = [ "rust-src" ]; # for rust-analyzer |
NewerOlder