Skip to content

Instantly share code, notes, and snippets.

Tibor Vass tiborvass

  • Docker
Block or report user

Report or block tiborvass

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:05f99086c7fce95c941c9aafb6d1b83e
package main
import (
"strconv"
"strings"
)
type version []int
func parseVersion(s string) (version, error) {
View create-user.sh
#!/bin/bash
useradd -s /bin/bash -m unprivileged
cp -rf ~/.ssh ~unprivileged/
chown -R unprivileged:unprivileged ~unprivileged/.ssh/
@tiborvass
tiborvass / gist:f9303e496644c77bd11ba08ec00d9fa0
Created Jul 25, 2017
archive/tar changes between go1.8 and go1.9rc1
View gist:f9303e496644c77bd11ba08ec00d9fa0
$ git log origin/release-branch.go1.8..origin/release-branch.go1.9 src/archive/tar
commit c991d2ab14496789146560608c5756d5d83b35f6
Author: Joe Tsai <joetsai@digital-static.net>
Date: Tue Jun 27 17:30:39 2017 -0700
archive/tar: use best effort at writing USTAR header
Prior to this change, if the Writer needed to use the PAX format, it would
output a USTAR header with an empty name. This should be okay since the PAX
specification dictates that the PAX record for "path" should override the
View main.go
package main
import (
"fmt"
git "gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/utils/ioutil"
)
func main() {
@tiborvass
tiborvass / Dockerfile
Last active Jul 7, 2017
Docker+vndr tip for Go libraries
View Dockerfile
FROM golang:1.8
RUN go get github.com/lk4d4/vndr
WORKDIR /go/src/github.com/someone/someproject
# Make sure vendor.conf only has commit hashes to always behave correctly with build caching.
COPY vendor.conf .
RUN vndr -whitelist '.*'
COPY . .
# Rationale:
# Go libraries can have 3rd-party dependencies and should have tests.
View gist:45bd25394f09b69fb682ac126877b9eb
[root@fedora-2gb-nyc3-01 ~]# curl -G https://experimental.docker.com/ | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- 100 14811 100 14811 0 0 84919 0 --:--:-- --:--:-- --:--:-- 85612
+ sh -c 'sleep 3; dnf -y -q install docker-engine'
warning: /var/cache/dnf/docker-experimental-repo-aab05090d83f3f86/packages/docker-engine-1.12.0-1.fc24.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 2c52609d: NOKEY
Importing GPG key 0x2C52609D:
Userid : "Docker Release Tool (releasedocker) <docker@docker.com>"
Fingerprint: 5811 8E89 F3A9 1289 7C07 0ADB F762 2157 2C52 609D
From : https://yum.dockerproject.org/gpg
View 1.12.0-rc2-cherrypicks.md

Cherrypicking the following:

  • #23555
  • 4104c1d Remove the node leader column, show leader as status.
  • #23505
  • 0254c12 surfacing Learn by example topics to top level of Docker Engine docs fixing links after moving surfacing tutorials
  • #23557
  • fec98ec Update experimental/README.md
  • #23301
  • 756f6ce daemon: allow tmpfs to trump over VOLUME(s)
@tiborvass
tiborvass / win32test.go
Last active Jan 8, 2018 — forked from dave-tucker/win32test.go
Detect on Windows if virtualization is enabled in the BIOS
View win32test.go
package main
import (
"fmt"
"syscall"
)
func main() {
var mod = syscall.NewLazyDLL("kernel32.dll")
var proc = mod.NewProc("IsProcessorFeaturePresent")
View keybase.md

Keybase proof

I hereby claim:

  • I am tiborvass on github.
  • I am tiborvass (https://keybase.io/tiborvass) on keybase.
  • I have a public key whose fingerprint is 61E0 BE56 8994 3F2D F37D A91D 0095 CA24 E24F D92E

To claim this, I am signing this object:

You can’t perform that action at this time.