helm install --debug --namespace metallb-system --name metallb stable/metallb
kubectl apply -f metallb-config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyEbs001: | |
Type: AWS::EC2::Volume | |
Properties: | |
Size: 1 | |
SnapshotId: !Sub ${BaseSnapshotId} | |
Encrypted: true | |
VolumeType: standard | |
AvailabilityZone: !Sub ${PrimaryPrivateAZ} | |
Tags: | |
- Key: foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/env python | |
import sys | |
import crypt | |
ptpasswd=sys.argv[1] | |
print(crypt.crypt(ptpasswd, "$6$" + crypt.mksalt())) |
Visit my blog or connect with me on Twitter
git init
or
- Download and install Ruby 2.0.0 (x86) and appropriate DevKit from http://rubyinstaller.org/downloads/
- Install DevKit following steps in https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
- Hope you have git and ruby in path run following code in CMD (or CMD with Ruby)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |