Skip to content

Instantly share code, notes, and snippets.

@1ma
1ma / trusty64
Created November 25, 2016 10:27
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
<?php
// After this run the registry garbage collector,
// it will mark new blob layers for removal:
// $ docker exec registry registry garbage-collect [--dry-run] /etc/docker/registry/config.yml
require_once __DIR__.'/vendor/autoload.php';
$apiBaseURI = 'https://registry.example.com:5000';
-- 100 million INSERTs benchmark
-- stock PostgreSQL 9.6 setup running on an Ubuntu 16.04 workstation
-- PK TYPE INSERT* time (ms) Relative time AVG throughput (op/s)
------------------------------------------------------------------------
-- BIGSERIAL 242,849.46 1.00 411,777.73
-- UUID COMB 337,028.15 1.39 296,711.12
-- UUID 1 470,385.37 1.94 212,591.65
-- UUID 4 7,808,502.45 32.15 12,806.55
------------------------------------------------------------------------
@1ma
1ma / centos7
Last active July 10, 2017 14:28
centos7
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", ip: "10.0.1.10"
config.ssh.forward_agent = true
config.vm.synced_folder "./", "/vagrant", type: "virtualbox"
config.vm.provider "virtualbox" do |vb|
<?php
declare(strict_types=1);
if (
1 === \version_compare('7.1.0', PHP_VERSION) ||
false === \extension_loaded('curl')
) {
\fwrite(STDERR, "bye bye\n");
exit(1);
[*] Updating `https://repo.voidlinux.eu/current/musl/x86_64-repodata' ...
[*] Updating `https://repo.voidlinux.eu/current/musl/nonfree/x86_64-repodata' ...
x86_64-repodata: [1550B 100%] 18MB/s ETA: 00m00s
x86_64-repodata: 1550B [avg rate: 18MB/s]
[*] Updating `https://repo.voidlinux.eu/current/x86_64-repodata' ...
[*] Updating `https://repo.voidlinux.eu/current/nonfree/x86_64-repodata' ...
x86_64-repodata: [15KB 27%] -- stalled -- ETA: 00m00s
x86_64-repodata: 15KB [avg rate: -- stalled --]
[*] Updating `https://repo.voidlinux.eu/current/aarch64/x86_64-repodata' ...
[*] Updating `https://repo.voidlinux.eu/current/multilib/x86_64-repodata' ...
@1ma
1ma / Dockerfile
Created July 9, 2018 12:44
phactor freezing issue
FROM alpine:3.8
ENV PHP_VERSION=7.2.7
ENV CFLAGS="-O3 -march=x86-64"
RUN apk add --no-cache \
# generic dependencies for compiling the source
alpine-sdk \
autoconf \
@1ma
1ma / Dockerfile
Created December 29, 2018 23:07
AdaCore GNAT 2016 environment based on Ubuntu
FROM ubuntu:14.04 AS adacore2016
ENV PATH="/usr/gnat/bin:${PATH}"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
libc6-dev \
make \
&& cd /tmp \
@1ma
1ma / AvailabilityServiceDriver.php
Last active January 28, 2019 13:20
Layout for an interruptible Availability Service
<?php
declare(strict_types=1);
final class AvailabilityServiceDriver
{
/**
* @var IterableAvailabilityService
*/
private $as;
@1ma
1ma / VoidLinuxNotes.md
Last active November 6, 2023 18:52
Void Linux Notes

Essential packages:

sudo xbps-install -Su void-repo-nonfree

sudo xbps-remove firefox-esr

sudo xbps-install -Su \
ascii \
baobab \