Skip to content

Instantly share code, notes, and snippets.

View andyshinn's full-sized avatar
🖥️
don't put computers in your mouth

Andy Shinn andyshinn

🖥️
don't put computers in your mouth
View GitHub Profile
@andyshinn
andyshinn / docker-compose.yml
Created August 31, 2016 19:22
Cachet Rancher
nginx:
labels:
io.rancher.container.pull_image: always
image: nginx:1.9-alpine
links:
- 'cachet:'
volumes:
- cachetnginx:/etc/nginx/conf.d
- cachetwww:/var/www
volume_driver: convoy
@andyshinn
andyshinn / README.md
Created June 9, 2016 15:38
pbcopy over SSH

Install

  • Add pbcopy.plist to your ~/Library/LaunchAgents/ folder.
  • Launch the listener with launchctl load ~/Library/LaunchAgents/pbcopy.plist.
  • Add RemoteForward 2224 127.0.0.1:2224 in your ~/.ssh/config file under your Host * or specific hosts sections.
  • Add [ -n "$SSH_CLIENT" ] && alias pbcopy="nc localhost 2224" to your remote ~/.bash_profile or other shell profile.
  • Enjoy pbcopy remotely!
@andyshinn
andyshinn / APKBUILD
Created April 2, 2016 16:57
netdata Alpine Linux package
# Contributor: Andy Shinn <andys@andyshinn.as>
# Maintainer: Andy Shinn <andys@andyshinn.as>
pkgname=netdata
pkgver=1.0.1
pkgrel=0
pkgdesc="Real-time performance monitoring, done right!"
url="https://github.com/firehol/netdata"
license="GPL"
arch="all"
depends="bash nodejs"
@andyshinn
andyshinn / gist:f71b05ba59a901db78e1
Created February 24, 2016 00:51
Change Quay permissions for all repositories
for repo in $(http --session quay GET "https://quay.io/api/v1/repository?namespace=$NAMESPACE&public=false" Authorization:"Bearer $AUTH_TOKEN" | jq -r '.repositories[].name'); do http --session quay PUT "https://quay.io/api/v1/repository/$NAMESPACE/$repo/permissions/team/$TEAM" role=read; done
root 12387 0.3 0.5 1286652 43544 ? Ssl 2015 227:56 /usr/bin/docker daemon
root 14174 0.0 0.0 18184 1652 ? Ss 2015 0:00 \_ /bin/bash /run.sh run
root 20744 0.9 0.4 83764 34036 ? S 07:08 5:03 | \_ python /var/lib/cattle/pyagent/main.py
root 21070 0.0 0.0 18392 1960 ? S 07:08 0:03 | \_ /bin/bash /var/lib/cattle/pyagent/cattle/process_watcher.sh
root 6692 0.0 0.0 4340 360 ? S 16:23 0:00 | | \_ sleep 2
root 21075 0.2 0.0 18580 2084 ? S 07:08 1:08 | \_ /bin/bash /var/lib/cattle/pyagent/cattle/plugins/conntrack/conntrack.sh
root 6696 0.0 0.0 18580 1064 ? R 16:23 0:00 | | \_ /bin/bash /var/lib/cattle/pyagent/cattle/plugins/conntrack/conntrack.sh
root 21076 0.0 0.1 483228 11368 ? Sl 07:08 0:27 | \_ host-api -cadvisor-url http://127.0.0.1:9344 -logtostderr=true -ip 0.0.0.0 -port 9345 -auth=true -host-uuid b1c
root 21082
FROM gliderlabs/alpine:3.3
RUN apk --no-cache add nodejs \
&& mkdir -p /public \
&& echo Hi > /public/index.html \
&& npm install -g http-server
CMD http-server -p 4200 -a 0.0.0.0
@andyshinn
andyshinn / Dockerfile
Created December 24, 2015 19:07
BusyBox cron container example
FROM gliderlabs/alpine:3.3
COPY myawesomescript /bin/myawesomescript
COPY root /var/spool/cron/crontabs/root
RUN chmod +x /bin/myawesomescript
CMD crond -l 2 -f
@andyshinn
andyshinn / composer.json
Last active February 18, 2024 12:05
Docker Compose PHP Composer Example
{
"require": {
"mfacenet/hello-world": "v1.*"
}
}
==> rancher-02: Setting hostname...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
sed -ri 's@^(([0-9]{1,3}\.){3}[0-9]{1,3})\s+rancher(\s.*)?$@\1 rancher-02 rancher-02@g' /etc/hosts
Stdout from the command:
docker() { if [[ "$@" == "bankruptcy" ]]; then command docker rm -f $(docker ps -a -q); docker rmi -f $(docker images -a -q); else command docker "$@"; fi }