Skip to content

Instantly share code, notes, and snippets.

View abn's full-sized avatar

Arun Babu Neelicattu abn

View GitHub Profile
@abn
abn / DnsPoison.java
Created July 10, 2014 01:51
Implementation of how to poison the positive cache used by java.net.InetAddress (DNS Poisoning)
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to you 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@abn
abn / nzbgetd@.service
Last active January 25, 2017 13:43
SystemD service file for nzbget
[Unit]
Description=NZBGet Daemon
DaemonAfter=network.target
[Service]
User=%i
ExecStart=/usr/bin/nzbget -D
ExecStop=/usr/bin/nzbget -Q
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
@abn
abn / install-gitlab-ci-fedora.sh
Last active August 29, 2015 14:07
GitLab CI on Fedora installation script
#!/usr/bin/env bash
# config
GITLAB_USER=${GITLAB_USER:-gitlab_ci}
GITLAB_HOME=${GITLAB_HOME:-/opt/${GITLAB_USER}}
GITLAB_CODE=${GITLAB_COD:-${GITLAB_HOME}/gitlab-ci}
GITLAB_DATABASE=${GITLAB_DATABASE:-gitlab_ci_production}
GITLAB_REPO=${GITLAB_REPO:-"https://gitlab.com/gitlab-org/gitlab-ci.git"}
GITLAB_BRANCH=${GITLAB_BRANCH:-"master"}
RUNAS_CMD="runuser --login ${GITLAB_USER} --command"
@abn
abn / install-gitlab-ci-runner-fedora.sh
Last active November 14, 2018 17:20
GitLab CI Runner on Fedora installation script
#!/usr/bin/env bash
# The MIT License (MIT)
#
# Copyright (c) 2014 Arun Babu Neelicattu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@abn
abn / heredoc-dockerfile.snip
Last active October 5, 2023 17:43
Dockerfile alternatives for heredoc
#printf
RUN printf '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
>> /tmp/hello
#echo
RUN echo -e '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
@abn
abn / fedora-install-intelmq.sh
Last active August 29, 2015 14:08
IntelMQ installation on Fedora 20
#!/usr/bin/env bash
# config
INTELMQ_USER=${INTELMQ_USER:-intelmq}
INTELMQ_HOME=${INTELMQ_HOME:-/etc/intelmq}
INTELMQ_URL=${INTELMQ_URL:-"git+https://github.com/certtools/intelmq.git"}
RUNAS_CMD="runuser --login ${INTELMQ_USER} --command"
# install deps
yum -y install git python python-pip python-devel redis

Keybase proof

I hereby claim:

  • I am abn on github.
  • I am abn (https://keybase.io/abn) on keybase.
  • I have a public key whose fingerprint is 5229 F596 474F 00A1 E416 CF8B 36F5 5054 C244 393B

To claim this, I am signing this object:

@abn
abn / make-cloud-init-iso.sh
Created March 5, 2015 04:36
Make cloud-init.iso with specified authorized key.
#!/usr/bin/env bash
PUB=${PUB-~/.ssh/id_rsa.pub}
USER=${USER-cloud-user}
HOST=${HOST-localhost}
if [ ! -f "${PUB}" ]; then
echo >&2 "[ERROR] Cloud not find pub key file at ${PUB}"
fi
@abn
abn / epel-release-latest
Created March 9, 2015 07:21
Install latest epel-release on RHEL 7 machine
#!/usr/bin/env bash
EPEL_URL_PREFIX=http://dl.fedoraproject.org/pub/epel/7/x86_64/e/
# install any requirements
yum -y install curl
RPM_NAME=$(curl --silent ${EPEL_URL_PREFIX} \
| egrep -oh "epel-release-7-[0-9]*.noarch.rpm" \
| sort -u | head -n 1)
@abn
abn / install-capstan-fedora.sh
Last active August 29, 2015 14:16
Install script for cloudius capstan
#!/usr/bin/env bash
# install dependencies
sudo yum install golang qemu-system-x86 qemu-img git
# install capstan
go get github.com/cloudius-systems/capstan