Skip to content

Instantly share code, notes, and snippets.

Sokratis Galiatsis sokratisg

Block or report user

Report or block sokratisg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dschaaff
dschaaff / notifySlack.groovy
Created Feb 9, 2018
jenkins pipeline library for slack notifications with nice formatting
View notifySlack.groovy
#!/usr/bin/env groovy
/**
* notify slack and set message based on build status
*/
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import hudson.tasks.test.AbstractTestResultAction;
import hudson.model.Actionable;
@pbabics
pbabics / gitlab-gc.sh
Created Nov 11, 2016
Manual garbage collector for gitlab registry, it removes old revisions that are not referenced by any tag
View gitlab-gc.sh
#!/bin/bash
BASE_PATH=/var/opt/gitlab/gitlab-rails/shared/registry/docker/registry/v2/repositories
DRY_RUN=0
KEEP_LAST_IMAGES=10
RUN_GARBAGE_COLLECTOR=0
GITLAB_CTL_COMMAND=`which gitlab-ctl`
@Eyjafjallajokull
Eyjafjallajokull / README.md
Last active Dec 12, 2019
AWS EBS - Find unused snapshots
View README.md

This script can help you find and remove unused AWS snapshots and volumes.

There is hardcoded list of regions that it searches, adjust the value to suit your needs.

Use snapshot.py snapshot-report to generate report.csv containing information about all snapshots.

snapshot.py snapshot-cleanup lets you interactively delete snapshot if it finds it is referencing unexisting resources.

./snapshots.py --help
@mrw34
mrw34 / gist:b12531d1a8df25f6c170
Last active Jul 29, 2019
Trello JSON to CSV conversion using jq
View gist:b12531d1a8df25f6c170
jq -r '["List", "Card"], ((reduce .lists[] as $list ({}; .[$list.id] = $list.name)) as $lists | .cards[] | select(.closed != true) | [$lists[.idList],.name]) | @csv' <nw3RUeLl.json
@ndemengel
ndemengel / whisper-calculator.py
Last active Aug 24, 2016 — forked from jjmaestro/whisper-calculator.py
Add weeks support to jjmaestro's script
View whisper-calculator.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def archive_to_bytes(archive):
def to_seconds(s):
SECONDS_IN_A = {
's': 1,
'm': 1 * 60,
'h': 1 * 60 * 60,
View 0000README.md

G1GC v.s. CMS for Cassandra 2.0

Many people have asked me about using the G1 garbage collector with Cassandra. Since most of my customers are running 2.0 in production the test is with 2.0 for now. Once I script it up I'll re-run the numbers with 2.1.

I also need to re-test with Java 7 and the Oracle JDKs.

TL;DR

@Gromph
Gromph / gist:5f4db73b0f38775bc2f0
Last active Sep 9, 2019
Install Cabot on CentOS7 using uwsgi, nginx, and mysql
View gist:5f4db73b0f38775bc2f0
The Cabot quick start instructions are for auto installing on ubuntu using fabric, gunicorn, postgres.
I wanted to install manually on CentOS 7 running with uwsgi, nginx, mysql, and use our own mail server for
alerts instead of Amazon SES
These are my notes on how I did that.
These notes aren't a complete walkthrough, and a few steps may be missing or wrong, but I thought they might
be helpful anyways.
Setup
1. adduser www
passwd www
@zmwangx
zmwangx / Postfix: sender-dependent SASL authentication.md
Last active Oct 1, 2019
Postfix: sender-dependent SASL authentication — relay to multiple SMTP hosts, or relay to the same host but authenticate as different users (e.g., two Gmail accounts)
View Postfix: sender-dependent SASL authentication.md

This is a sequel to "Postfix: relay to authenticated SMTP".

I would like to send mail from two different Gmail accounts using Postfix. Here is the relevant section in the Postfix documentation: Configuring Sender-Dependent SASL authentication.

As a concrete example, here's how to set up two Gmail accounts (only relevant sections of the config files are listed below):

/etc/postfix/main.cf:
    # sender-dependent sasl authentication
    smtp_sender_dependent_authentication = yes
    sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
View haproxy.cfg
global
log logstash local0 #Change logstash to your naming
log-send-hostname
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
maxconn 4000
defaults
@jkreps
jkreps / benchmark-commands.txt
Last active Nov 25, 2019
Kafka Benchmark Commands
View benchmark-commands.txt
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
You can’t perform that action at this time.