Skip to content

Instantly share code, notes, and snippets.

View eriknelson's full-sized avatar
🤘

Erik Nelson eriknelson

🤘
View GitHub Profile
[Unit]
Description="blog.eriknelson.me"
[Service]
User=blog
Restart=always
WorkingDirectory=/srv/eriknelson.me
ExecStart=/bin/bash -c "npm start --production"
[Install]
import sys
import json
from atomicapp.nulecule.base import Nulecule
from atomicapp.nulecule.config import Config
TEST_NULECULE_PATH = '/home/ernelson/cap/nulecule-library/wordpress-centos7-atomicapp'
nulecule = Nulecule.load_from_path(TEST_NULECULE_PATH)
nulecule.config = Config()
nulecule.load_config(skip_asking=True)
---
specversion: 0.0.2
id: wordpress-atomicapp
metadata:
name: Wordpress App
appversion: 2.0.0
description: Simple Wordpress atomic app. Uses remote mysql atomic app.
location: docker.io/projectatomic/wordpress-centos7-atomicapp
# aa3 index list
INFO :: Atomic App: 0.6.3 - Mode: Index
WARN :: Couldn't load index file: /home/nelsk/.atomicapp/index.yaml
INFO :: Retrieving index...
INFO :: Pulling docker image: projectatomic/nulecule-library
INFO :: Copying files from image projectatomic/nulecule-library:/index.yaml to /home/nelsk/.atomicapp/index.yaml
ID VER PROVIDERS LOCATION
postgresql-atomicapp 1.0.0 {D,O,K} docker.io/projectatomic/postgresql-centos7-atomicapp
flask_redis_nulecule 0.0.1 {D,K} docker.io/projectatomic/flask-redis-centos7-atomicapp
redis-atomicapp 0.0.1 {D,O,K} docker.io/projectatomic/redis-centos7-atomicapp
@eriknelson
eriknelson / main.go
Created November 16, 2016 19:01
Async go workers
package main
import (
"fmt"
"math/rand"
"runtime"
"sync"
"time"
)
@eriknelson
eriknelson / cmdrunner.go
Created November 28, 2016 21:06
Scanner demo
package main
import (
"bufio"
"fmt"
"os/exec"
)
const xfile = "/home/nelsk/dev/go/src/ticker/ticker"
@eriknelson
eriknelson / gist:5b386e24b979e5461f1a99519c9a0f4c
Created January 16, 2017 21:30
rsync grep matched files
# Reads --files-from - (stdin)
ls -A1 | grep -E "(E1[0-2])|(E0[5-9])" | rsync -arvsP --files-from - ./ [email protected]:/nas/tv/Duder\ Spaced/Season\ 2\ 264

Keybase proof

I hereby claim:

  • I am eriknelson on github.
  • I am eriknelson (https://keybase.io/eriknelson) on keybase.
  • I have a public key whose fingerprint is C24D 1DC3 AD5F 47AB 1769 7B94 6C74 5559 3BC4 D45C

To claim this, I am signing this object:

FROM centos:7
MAINTAINER Erik Nelson <[email protected]>
LABEL "com.redhat.ansibleapp.version"="0.1.0"\
"com.redhat.ansibleapp.spec"=\
"LS0tCmlkOiBjOWUzMzQ4Yy1iNmZkLTQ1ZDYtYjJiYS1hMTNiNDFmMGI2ZTMKbmFtZTogZnVzb3Iv\
ZXRoZXJwYWQtYW5zaWJsZWFwcApkZXNjcmlwdGlvbjogTm90ZSB0YWtpbmcgd2ViIGFwcGxpY2F0\
aW9uCmJpbmRhYmxlOiB0cnVlCmFzeW5jOiAib3B0aW9uYWwiCnBhcmFtZXRlcnM6CiAgLSBuYW1l\
OiBob3N0cG9ydAogICAgZGVzY3JpcHRpb246IFRoZSBob3N0IFRDUCBwb3J0IGFzIHRoZSBleHRl\
cm5hbCBlbmRwb2ludAogICAgZGVmYXVsdDogOTAwMQogIC0gbmFtZTogZGJfdXNlcgogICAgZGVz\
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
is a useful one-liner which will give you the full directory name of the script no matter where it is being called from.