Skip to content

Instantly share code, notes, and snippets.

View thaJeztah's full-sized avatar
🐳
Reviewing da peee-aaaaarrs

Sebastiaan van Stijn thaJeztah

🐳
Reviewing da peee-aaaaarrs
  • thaJeztah
  • Netherlands
  • 10:13 (UTC +02:00)
  • X @thaJeztah
View GitHub Profile
@thaJeztah
thaJeztah / docker-compile.pl
Last active August 29, 2015 14:02 — forked from mpasternacki/docker-compile.pl
Perl script to build a Docker image from Dockerfile that creates the image in a single layer, without any intermediate images. Needs JSON CPAN module (available as `libjson-perl` Debian/Ubuntu package). Usage: run the script in the directory that contains a Dockerfile. More details in a blog post: http://3ofcoins.net/2013/09/22/flat-docker-images/
#!/usr/bin/env perl
use feature 'switch';
use strict;
use warnings;
use Data::Dumper;
use File::Basename;
use File::Copy;
use File::Path qw/make_path/;
@thaJeztah
thaJeztah / invalid-json-json-inside-string-double.Dockerfile
Last active August 29, 2015 14:05
Some incorrect Dockerfiles for testing
CMD '["echo", "Well, JSON in a string is JSON too?"]'
mysql 5 722147135e89 5 weeks ago 235.6 MB
mysql 5.6.20 722147135e89 5 weeks ago 235.6 MB
docker rmi 722147135e89
Error response from daemon: No such id: 722147135e89b2082ec729ce12266614ee573ae910c0ea8f85ffb3b3b568a587
2014/11/08 11:52:29 Error: failed to remove one or more images
docker rmi mysql:5.6.20
@thaJeztah
thaJeztah / gist:ace613f8433ac888ea41
Created November 15, 2014 16:21
New regex (JSON API V2)

New regex (JSON API V2)

Quick evaluation of the regex as proposed in moby/moby#9015 and mentioned in moby/moby#8961 (comment)

NOTE 1; The actual regex is [a-z0-9]+(?:[._-][a-z0-9]+)*. I left out the ?:, because that only distracts here and is to make the group 'non-capturing'

setenv SSH_ENV $HOME/.ssh/environment
if [ -n "$SSH_AGENT_PID" ]
ps -ef | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null
if [ $status -eq 0 ]
test_identities
end
else
if [ -f $SSH_ENV ]
. $SSH_ENV > /dev/null
@thaJeztah
thaJeztah / docker-examples.md
Last active January 14, 2024 02:00
Some docker examples

Commit, clone a container

To 'clone' a container, you'll have to make an image of that container first, you can do so by "committing" the container. Docker will (by default) pause all processes running in the container during commit to preserve data-consistency.

For example;

docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd
@thaJeztah
thaJeztah / gist:2bead9762a7c9df6dee4
Created December 21, 2014 13:37
default packages in debian:wheezy
dpkg --get-selections
apt							install
base-files					install
base-passwd					install
bash						install
bsdutils					install
coreutils					install
dash						install
debconf						install

debconf-i18n install

@thaJeztah
thaJeztah / Dockerfile
Created January 15, 2015 16:18
Alternative Dockerfile
FROM ubuntu:trusty
MAINTAINER Paul Bowsher <paul.bowsher@gmail.com>
RUN apt-get update && apt-get install -y -q \
build-essential \
git \
libssl-dev \
libsqlite3-dev \
nodejs \
ruby-dev \
@thaJeztah
thaJeztah / gist:62dc9d655e8e836414f7
Created January 28, 2015 21:11
MySQL 5.6.22 logs
Running mysql_install_db ...
2015-01-28 21:08:47 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-01-28 21:08:47 12 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-01-28 21:08:47 12 [Note] InnoDB: The InnoDB memory heap is disabled
2015-01-28 21:08:47 12 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-01-28 21:08:47 12 [Note] InnoDB: Memory barrier is not used
2015-01-28 21:08:47 12 [Note] InnoDB: Compressed tables use zlib 1.2.7
2015-01-28 21:08:47 12 [Note] InnoDB: Using Linux native AIO
2015-01-28 21:08:47 12 [Note] InnoDB: Using CPU crc32 instructions
2015-01-28 21:08:47 12 [Note] InnoDB: Initializing buffer pool, size = 128.0M
@thaJeztah
thaJeztah / pr.md
Last active August 29, 2015 14:15 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: