Skip to content

Instantly share code, notes, and snippets.

View xdire's full-sized avatar
😍
Future is coming

Anton Repin xdire

😍
Future is coming
View GitHub Profile
@xdire
xdire / tailing_consumer.go
Created November 5, 2019 06:25 — forked from edenhill/tailing_consumer.go
confluent-kafka-go example to start consuming 5 messages from the end (tail 5)
// Example function-based high-level Apache Kafka consumer
package main
/**
* Copyright 2016 Confluent Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@xdire
xdire / git_push.sh
Created June 10, 2019 23:52
Git push with a different SSH key for cases when someone uses multiple accounts
// Use SSH Agent command evaluator
ssh-agent sh -c \
'ssh-add ~/.ssh/id_rsa_other;\
git push --set-upstream origin proper_branch_name'
@xdire
xdire / signalTest.php
Created July 13, 2017 07:32
PHP Application Signal Handling
<?php
// Declare Ticks as a required mechanics to handle Signals
declare(ticks = 1);
// Throw Error on
pcntl_signal(SIGINT, function($sig) {
throw new Exception("Interrupted by client signal: ".$sig,500);
});