Skip to content

Instantly share code, notes, and snippets.

View milosgajdos's full-sized avatar
📡
👨‍💻

Milos Gajdos milosgajdos

📡
👨‍💻
View GitHub Profile
@milosgajdos
milosgajdos / gist:7cc9028a962fb5635ada
Last active August 29, 2015 14:03
Add an extra veth interface to Docker
package main
import (
"fmt"
"log"
"net"
"github.com/milosgajdos83/tenus"
)
@milosgajdos
milosgajdos / gist:296fb90d076f259a5b0a
Last active March 12, 2019 05:34
Add a MAC VLAN interfaces into Docker from the host machine
package main
import (
"fmt"
"log"
"net"
"github.com/milosgajdos83/tenus"
)
@milosgajdos
milosgajdos / gist:9f68b1818dca886e9ae8
Last active December 1, 2019 23:28
Add a VLAN interfaces into Docker from the host machine
package main
import (
"fmt"
"log"
"net"
"github.com/milosgajdos83/tenus"
)
@milosgajdos
milosgajdos / gist:b953462536dd52dedcdc
Last active December 18, 2019 10:43
Chef recipe to deploy .NET applications
# Used for search
tag('msapp')
# Install AWS ruby libraries
include_recipe "aws"
# Load Encrypted data bag secrets
msapp_secrets = Chef::EncryptedDataBagItem.load("msapp", "secrets")
# Build artifact vars using get_version() library function

Keybase proof

I hereby claim:

  • I am milosgajdos83 on github.
  • I am milosgajdos (https://keybase.io/milosgajdos) on keybase.
  • I have a public key whose fingerprint is A918 3E61 9239 3456 AC28 24E1 3ABF EBD5 DB39 DB1A

To claim this, I am signing this object:

FROM debian:jessie
RUN apt-get update && apt-get install -y socat && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && rm -fr *Release* *Sources* *Packages* && \
truncate -s 0 /var/log/*log
ENV SSH_AUTH_PROXY_PORT 1234
COPY ./start /
Verifying that +milosgajdos is my openname (Bitcoin username). https://onename.com/milosgajdos
@milosgajdos
milosgajdos / test.go
Last active March 29, 2019 08:23
NATS test
package queue_test
import (
"os"
"testing"
"github.com/nats-io/gnatsd/server"
"github.com/nats-io/gnatsd/test"
"github.com/nats-io/nats"
)
@milosgajdos
milosgajdos / tuple_match.ex
Created October 26, 2015 20:03
Find out if all elements in tuple have the same value
iex(5)> foo = {1,2,3}
{1, 2, 3}
iex(6)> bar = {1,1,1}
{1, 1, 1}
iex(7)> {item, item, item} = foo
** (MatchError) no match of right hand side value: {1, 2, 3}
iex(7)> {item, item, item} = bar
{1, 1, 1}
iex(8)>
file70 <- read.csv("specdata/070.csv")
file71 <- read.csv("specdata/071.csv")
file72 <- read.csv("specdata/072.csv")
df70 <- sum(complete.cases(file70))
df70
df71 <- sum(complete.cases(file71))
df71
df72 <- sum(complete.cases(file72))
df72
data70 <- file70[complete.cases(file70), "nitrate"]