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/local/plan9/bin/rc | |
. 9.rc | |
. $PLAN9/lib/acme.rc | |
fn convert { | |
awk -F'=' ' | |
$1 == "indent_style" { | |
print "Spaces", ($2 == "space") ? "on" : "off" | |
} |
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
/* | |
* ctrl-f1 | |
* ------- | |
* Query or toggle the "Full Keyboard Access" hotkey, Ctrl-F1 | |
* | |
* make CC=clang CFLAGS="-framework Carbon" ctrl-f1 | |
*/ | |
#include <Carbon/Carbon.h> |
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/local/plan9/bin/rc | |
. 9.rc | |
. $PLAN9/lib/acme.rc | |
event=$1 | |
target=$2 | |
fn hashbang { | |
awk ' |
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
PROJECT=foo | |
SOURCES=bar.c baz.c | |
LIBRARY=nope | |
INCPATHS=../some_other_project/ | |
LIBPATHS=../yet_another_project/ | |
LDFLAGS=-ldosomething | |
CFLAGS=-c -Wall | |
CC=gcc | |
# ------------ MAGIC BEGINS HERE ------------- |
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
.PHONY: help | |
help: ## Show this help | |
@awk -F ':.* ## ' '/^\w.*##/{printf "%-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST) |
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
#!/bin/sh | |
# Usage: changes <version> [<file>...] | |
# Print the changes made in <version> according to the changelog | |
# Defaults: <file>: CHANGELOG.md | |
if [ $# -eq 0 ]; then | |
usage "$0" | |
exit 64 | |
fi |
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
# $HOME/.config/nixpkgs/overlays/nix-2.3.10.nix | |
# pin nix to version 2.3 | |
self: super: | |
{ | |
nixStable = super.nix_2_3; | |
nix = super.nix_2_3; | |
nix_2_4 = super.nix_2_3; | |
} |
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
// Source: http://blog.mbcharbonneau.com/post/56581688/better-logging-in-objective-c | |
#define DebugLog(format, ...) NSLog(@"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(format), ##__VA_ARGS__]) |
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 bash | |
host=${1:?missing host} | |
port=${2:?missing port} | |
timeout=${3:-180} | |
until (exec 3<>"/dev/tcp/$host/$port") &>/dev/null; do | |
((timeout == 0)) && exit 1 | |
((timeout--)) | |
echo -n . | |
sleep 1 | |
done |
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
(with-open-file (!!!-stream (merge-pathnames ".sbcl_completions" (user-homedir-pathname)) | |
:direction :output | |
:if-exists :supersede) | |
(let ((!!!-seen (make-hash-table :size 6000 :test #'equal)) | |
(!!!-cl-package (find-package "CL")) | |
(!!!-cl-user-package (find-package "CL-USER"))) | |
(loop for !!!-package in (list-all-packages) | |
do (let ((!!!-prefixes | |
(if (or (eq !!!-package !!!-cl-package) | |
(eq !!!-package !!!-cl-user-package)) |
NewerOlder