Skip to content

Instantly share code, notes, and snippets.

View archii's full-sized avatar
🌻
I may be slow to respond.

Archie Harris archii

🌻
I may be slow to respond.
View GitHub Profile
@archii
archii / gitlab-omnibus-backup.sh
Created May 9, 2016 01:26 — forked from cyriac/gitlab-omnibus-backup.sh
Gitlab Omnibus backup to Amazon S3
gitlab-rake gitlab:backup:create
find /var/opt/gitlab/backups -mtime +7 -exec rm {} \;
s3cmd sync --skip-existing --delete-removed /var/opt/gitlab/backups/ s3://<s3-bucket-name>/gitlab/backups/
@archii
archii / logstash.index.json
Created June 1, 2016 03:29 — forked from WPsites/logstash.index.json
Elasticsearch index template for logstash that contains additional NGINX fields
{
"template_logstash":{
"template" : "logstash*",
"settings" : {
"number_of_shards" : 5,
"index.cache.field.type" : "soft",
"index.refresh_interval" : "5s",
"index.store.compress.stored" : true,
"index.query.default_field" : "message",
"index.routing.allocation.total_shards_per_node" : 5
@archii
archii / librarian-puppet-win.md
Created November 24, 2016 04:18 — forked from mishak87/librarian-puppet-win.md
Howto install puppet and librarian-puppet on Win 7
#! /bin/env python
import sys
import crypt
ptpasswd=sys.argv[1]
print(crypt.crypt(ptpasswd, "$6$" + crypt.mksalt()))
@archii
archii / gfid-resolver.sh
Created October 1, 2017 09:58 — forked from louiszuckerman/gfid-resolver.sh
Glusterfs GFID Resolver Turns a GFID into a real path in the brick
#!/bin/bash
if [[ "$#" < "2" || "$#" > "3" ]]; then
cat <<END
Glusterfs GFID resolver -- turns a GFID into a real file path
Usage: $0 <brick-path> <gfid> [-q]
<brick-path> : the path to your glusterfs brick (required)
@archii
archii / ovirt-engine-vdsm-iptables
Created November 28, 2017 04:09 — forked from andrewklau/ovirt-engine-vdsm-iptables
oVIrt Engine + VDSM iptables rules
# oVirt default firewall configuration. Automatically generated by vdsm bootstrap script.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -i lo -j ACCEPT
@archii
archii / git_iter_commit_blob_grep.sh
Created October 3, 2018 00:35
loop through git commits looking for a pattern in a blob
branch='master'
blob='src/Web/app/Main.hs'
pattern='import Data'
for i in {1..40}; do
echo ${i};
git show ${branch}~${i}:${blob}| grep "${pattern}";
done
@archii
archii / install.md
Last active July 19, 2023 19:36
metallb-config for minikube/hyperkit/macos
  1. helm install --debug --namespace metallb-system --name metallb stable/metallb
  2. kubectl apply -f metallb-config.yaml
@archii
archii / persistent-ebs-ec2-example-snippet.yml
Created December 21, 2023 01:54
Persistent EBS Example
MyEbs001:
Type: AWS::EC2::Volume
Properties:
Size: 1
SnapshotId: !Sub ${BaseSnapshotId}
Encrypted: true
VolumeType: standard
AvailabilityZone: !Sub ${PrimaryPrivateAZ}
Tags:
- Key: foo