- Start a fresh Ubuntu container:
docker run -it ubuntu bash
- Inside the container:
apt-get update
apt-get install figlet
- Detach from container:
<ctl-p> <ctl-q>
- Get the container id:
docker ps
- Save the container as an image:
docker commit $container_id my-image
- Test the new image:
docker run my-image figlet hello
This file contains hidden or 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
$ x='a\b' | |
$ echo $x | |
a\b | |
$ echo "$x" | |
a\b | |
$ echo $x | hexdump -C | |
00000000 61 5c 62 0a |a\b.| | |
00000004 | |
$ [ $x == $x ] || echo hmmm | |
$ [ "$x" == "$x" ] || echo hmmm |
This file contains hidden or 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 perl | |
use strict; | |
# Get all the letters from stdin: | |
my $input = do {local $/; <>}; | |
$input =~ s/[^a-zA-Z]//g; | |
# All 3+ letter English words, longest to shortest: | |
my @long = grep {length > 2} | |
sort {length $b <=> length $a} |
This file contains hidden or 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
$ for u in `cat github-leaders`; do printf "%-20s%s\n" $u `git hub user-get $u followers`; done | |
kevinsawicki 1028 | |
taylorotwell 1977 | |
qiangxue 654 | |
michaelklishin 458 | |
brianchandotcom 381 | |
mitchellh 1614 | |
fabpot 3966 | |
ornicar 493 | |
jdalton 732 |
This file contains hidden or 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
--- !!yaml | |
version: 2.0 | |
schema: | |
type: YeS | |
file: ./foo.yes | |
tag: | |
- !ingy: ingy.net,2001 | |
- !obk: ben-kiki.net,2000 | |
--- !ingy!hacker | |
name: Ingy |
This file contains hidden or 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
$ curl --request POST https://api.github.com/repos/ingydotnet/zilla-dist-pm/hooks -d '{"name":"travis","active":true,"events":[ "push" ],"config":{"user":"ingydotnet","token":"********"}}' --header 'Authorization: token ********' --header 'If-None-Match: "45cc5f3c5c128e6a79b9a4d46e8b6c0f"' --user-agent git-hub-0.0.3 --silent --show-error --dump-header - | |
HTTP/1.1 412 Precondition Failed | |
Server: GitHub.com | |
Date: Sat, 26 Jul 2014 17:43:30 GMT | |
Content-Type: text/html;charset=utf-8 | |
Transfer-Encoding: chunked | |
Status: 412 Precondition Failed | |
X-RateLimit-Limit: 5000 | |
X-RateLimit-Remaining: 4980 | |
X-RateLimit-Reset: 1406399175 |
This file contains hidden or 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 | |
set -ex | |
rm -fr p1 p2 lib lib.git | |
( | |
mkdir lib p1 p2 | |
git init --bare lib | |
git init p1 | |
git init p2 |
This file contains hidden or 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
reviewed: | |
- dan: | |
review_title: | |
review_description: | |
review_count: | |
reviewer_name: | |
reviewr_city: | |
- mark: | |
review_title: | |
review_description: |