Skip to content

Instantly share code, notes, and snippets.

View aakropotkin's full-sized avatar

Alex Ameen aakropotkin

  • Block
  • Austin Texas
View GitHub Profile
/* -*- mode: c; -*- */
/* ========================================================================= *
*
* This file has been written in order to easily wrap existing C programs,
* and test their runtime.
*
* It simply runs `main' of the wrapped program repeatedly, and provides an
* average of timed runs. Whatever it is that you actually want to time
* should be placed there, which is not always ideal for large existing
/*
* Install this extension by pasting this script into a "JavaScript Injector" add-on for your browser.
* For Chrome on Desktop try "Custom JavaScript for websites". (Chrome on Mobile does not support add-ons)
* For Firefox "JS Injector" works for both Mobile and Desktops.
*
* What it does:
* - 91-93% IV Pokemon are highlighted in Yellow.
* - 96-98% IV Pokemon are highlighted in Orange.
* - 100% IV Pokemon are highlighted in Red. (same as the default site)
* - Pokemon with known IVs 0-89% are highlighted in Blue.
@aakropotkin
aakropotkin / colors.nix
Last active August 9, 2019 20:08
Color Modules for Home-Manager or NixOS
{ config, lib, pkgs, ... }:
with lib;
let
colors = config.colors;
BtoString = cond: if cond then "true" else "false";
oSN = k: v: optionalString (v != null) "${k}: ${v}";
@aakropotkin
aakropotkin / .sbclrc-local.lisp
Created August 6, 2019 23:48
localized CLISP shell.nix
;; -*- mode: lisp-mode -*-
;; Load Quicklisp, initialize if missing.
(defparameter *first-run* nil)
(let* ((ql-dir (merge-pathnames "quicklisp/" (user-homedir-pathname)))
(ql-init (merge-pathnames "setup.lisp" ql-dir)))
(when (not (probe-file ql-dir))
(sb-ext:run-program "/usr/bin/env" '("quicklisp" "init")
:input t :output t)
(setq *first-run* t))
@aakropotkin
aakropotkin / lorem.h
Last active March 18, 2019 08:41
Lorem Ipsum inputs for DVP HW7.1
/* 10K, 100K, and 1000K strings of filler. */
/* Offset versions are unaligned the signified bytecount. */
char * lorem10; /* Alias for lorem10_off0 */
char * lorem10_off0, * lorem10_off1, * lorem10_off2, * lorem10_off3;
char * lorem10_off4, * lorem10_off5, * lorem10_off6, * lorem10_off7;
char * lorem100; /* Alias for lorem100_off0 */
char * lorem100_off0, * lorem100_off1, * lorem100_off2, * lorem100_off3;
char * lorem100_off4, * lorem100_off5, * lorem100_off6, * lorem100_off7;
char * lorem1000; /* Alias for lorem1000_off0 */
@aakropotkin
aakropotkin / nix-search.sh
Created March 13, 2019 01:27
FZF Fuzzy search for NixOS Options and Packages
#! /usr/bin/env bash
# Provided a list of package and option names (provided by my `writeOpts.sh` and
# `writePacks.sh` scripts), fuzzy search package and options information.
# The selection's definition will be opened in vim (as readonly) for viewing.
# NOTE: This script opens the result in a new URxvt window, you most likely will want
# to change that to open in the current window, or your own Terminal Emulator of
# choice. The current implementation is intended for use with a temporary XMonad
# scratchpad, which dies immediately after exiting (thus a new URxvt window is
# required).