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
import * as tar from "tar-stream"; | |
import gunzip from "gunzip-maybe"; | |
import { pipeline } from "stream"; | |
import { promisify } from "util"; | |
const pipelineAsync = promisify(pipeline); | |
const dockerRegistryUrl = "https://registry-1.docker.io"; | |
const imageName = "library/ubuntu"; // Replace with your image name | |
const tag = "latest"; // or the specific tag you want to download |
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
FROM alpine:3 as tini | |
# The is automatically set by docker buildx | |
ARG TARGETARCH | |
# From https://github.com/krallin/tini#signed-binaries | |
ENV TINI_VERSION v0.19.0 | |
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-${TARGETARCH} /tini | |
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-${TARGETARCH}.asc /tini.asc | |
RUN apk add --no-cache gnupg \ | |
&& gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \ | |
&& gpg --batch --verify /tini.asc /tini |
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
package pkg | |
import ( | |
"crypto/ecdsa" | |
"crypto/elliptic" | |
"encoding/base64" | |
"errors" | |
"math/big" | |
) |
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 python | |
import signal, subprocess, sys | |
signal.sigwait([signal.SIGTERM]) |
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
{ | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem | |
(system: | |
let pkgs = nixpkgs.legacyPackages.${system}; in | |
{ | |
devShells.default = import ./shell.nix { inherit pkgs; }; | |
} | |
); | |
} |
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 | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
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
/* | |
* Mostly ripped off of console-tools' writevt.c | |
*/ | |
#include <stdio.h> | |
#include <fcntl.h> | |
#include <termios.h> | |
#include <sys/ioctl.h> | |
#include <unistd.h> | |
#include <string.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
#!/bin/sh | |
# Versioning.sh | |
# | |
# https://gist.github.com/791352 by Marc Hedlund | |
# | |
# Found at http://kswizz.com/post/2686511526/git-xcode-versioning and slightly | |
# modified. | |
# To install: |
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
private static func keyCodeToString(keyCode: CGKeyCode, eventModifiers: Int) -> String? { | |
let curKeyboard = TISCopyCurrentKeyboardInputSource().takeRetainedValue() | |
let rawLayoutData = TISGetInputSourceProperty(curKeyboard, kTISPropertyUnicodeKeyLayoutData) | |
let layoutData = unsafeBitCast(rawLayoutData, to: CFData.self) | |
let keyboardLayoutPtr = unsafeBitCast(CFDataGetBytePtr(layoutData), to: UnsafePointer<UCKeyboardLayout>.self) | |
var deadKeyState: UInt32 = 0 | |
var actualStringLength = 0 | |
var unicodeString: [UniChar] = [0, 0, 0, 0] |
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
999 | |
"DXF R12 Output" (www.mydxf.blogspot.com) | |
0 | |
SECTION | |
2 | |
HEADER | |
9 | |
$ACADVER | |
1 | |
AC1009 |
NewerOlder