Skip to content

Instantly share code, notes, and snippets.

View apiri's full-sized avatar
😲
😱

Aldrin Piri apiri

😲
😱
View GitHub Profile
@apiri
apiri / .tmux.conf
Created March 11, 2020 03:46 — forked from rodricels/.tmux.conf
tmux configuration, mouse copy & paste added
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf
# Scroll History
set -g history-limit 50000
# show messages for 4 seconds instead
set -g display-time 4000
# set first window to index 1 (not 0) to map more to the keyboard layout
set-option -g renumber-windows on
@apiri
apiri / add_contrib.sh
Created February 19, 2020 19:17
Adds a user with the specified username to the contributor role for all projects in the NiFi ecosystem
#!/bin/sh -e
# Inspired by https://community.atlassian.com/t5/Jira-questions/How-to-add-user-to-project-role-using-jira-rest-api-and-json/qaq-p/593827#M197010
# instance properties
jira_instance='https://issues.apache.org/jira/rest/api/2'
username='YOUR JIRA USERNAME'
password='YOUR JIRA PASSWORD'
user_to_add=$1
@apiri
apiri / nar_listing
Last active August 21, 2019 18:35
Largest NARs in NiFi omitting framework and standard
$ ls -lSh *.nar | head -n 50 | grep -v standard | grep -v framework | awk {'print $5"\t"$9'}
96M nifi-hive-nar-1.10.0-SNAPSHOT.nar
78M nifi-scripting-nar-1.10.0-SNAPSHOT.nar
63M nifi-media-nar-1.10.0-SNAPSHOT.nar
43M nifi-druid-controller-service-api-nar-1.10.0-SNAPSHOT.nar
40M nifi-hbase_2-client-service-nar-1.10.0-SNAPSHOT.nar
40M nifi-other-graph-services-nar-1.10.0-SNAPSHOT.nar
36M nifi-hadoop-libraries-nar-1.10.0-SNAPSHOT.nar
33M nifi-elasticsearch-client-service-nar-1.10.0-SNAPSHOT.nar
32M nifi-flume-nar-1.10.0-SNAPSHOT.nar
@apiri
apiri / nifi-gitbox-migration.md
Last active March 23, 2021 14:00
Apache NiFi Gitbox Migration

(quick note: a markdown formatted version of this content is available at [3])

All,

There was a flurry of messages as we sought to get some quick details out about our migration to the ASF Gitbox system and I wanted to take this message to consolidate those items into a comprehensive and less hastily composed message.

There are a few different paths to consider and I will try to enumerate those with the associated steps, so please choose your own adventure. Please note that this change does affect ALL repositories in the NiFi community and all references to NiFi refer to our efforts as a whole.

You have one or more repositories checked out. These repositories are either from GitHub (in the case of NiFi, https://github.com/apache/nifi) or git-wip (in the case of NiFi, http://git-wip-us.apache.org/repos/asf/nifi.git). Each of the repositories will need to be handled based on your role in the community and desired functionality.

[core]
excludesfile = /Users/apiri/.gitignore_global
attributesfile = /Users/apiri/.gitattributes
[diff "zip"]
textconv = unzip -p
binary = true
[diff "gz"]
textconv = gzcat
binary = true
[diff "bz2"]
@apiri
apiri / Makefile
Created April 27, 2018 16:17 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@apiri
apiri / alias_dns.py
Created October 28, 2017 16:50 — forked from patrickfuller/alias_dns.py
Enables local DNS resolution of Unifi aliases
"""
When run in cron, automatically adds compliant alias names to local DNS.
Use at your own risk.
Patrick Fuller, 25 June 17
"""
import re
import paramiko
import pymongo
@apiri
apiri / config.yml
Created August 21, 2017 19:08
MiNiFi Flow to generate and sink flowfiles
MiNiFi Config Version: 3
Flow Controller:
name: Lots of Logs
comment: ''
Core Properties:
flow controller graceful shutdown period: 10 sec
flow service write delay interval: 500 ms
administrative yield duration: 30 sec
bored yield duration: 10 millis
max concurrent threads: 1
@apiri
apiri / isolated_user_osx.sh
Last active January 6, 2017 16:12
Creates and isolated system/service user in OS X from http://serverfault.com/a/562926
#!/bin/bash
if (( $(id -u) )) ; then
echo "This script needs to run as root"
exit 1
fi
if [[ -z "$1" ]] ; then
echo "Usage: $(basename $0) [username] [realname (optional)]"
exit 1
@apiri
apiri / rsync_parallel.sh
Created January 1, 2017 19:12 — forked from rcoup/rsync_parallel.sh
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes: