Skip to content

Instantly share code, notes, and snippets.

View hsmiranda's full-sized avatar
:octocat:
Coding!

Herberson Miranda hsmiranda

:octocat:
Coding!
View GitHub Profile
@hsmiranda
hsmiranda / tg-example-bot.pl
Created April 3, 2016 18:54 — forked from Robertof/tg-example-bot.pl
Basic Telegram bot implementation using WWW::Telegram::BotAPI
#!/usr/bin/env perl
# Basic Telegram Bot implementation using WWW::Telegram::BotAPI
use strict;
use warnings;
use WWW::Telegram::BotAPI;
my $api = WWW::Telegram::BotAPI->new (
token => (shift or die "ERROR: a token is required!\n")
);
@hsmiranda
hsmiranda / dev.conf
Created April 16, 2017 17:49 — forked from fnando/dev.conf
Nginx configuration for SSH tunnel
upstream tunnel {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name dev.codeplane.com br.dev.codeplane.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
@hsmiranda
hsmiranda / jenkins_copying_configuration.sh
Created January 13, 2018 23:26 — forked from mriddle/jenkins_copying_configuration.sh
Moving Jenkins server configuration from one server to another
ORIGINAL_JENKINS_SERVER=
ORIGINAL_SERVER_USER=
NEW_JENKINS_SERVER=
NEW_SERVER_USER=
# ON THE ORIGINAL JENKINS SERVER
ssh $ORIGINAL_SERVER_USER@$ORIGINAL_JENKINS_SERVER
cd /var/lib/jenkins/
for i in `ls jobs`; do echo "jobs/$i/config.xml";done > config.totar
@hsmiranda
hsmiranda / server_hardening.md
Created August 17, 2018 00:59 — forked from vivianspencer/server_hardening.md
Debian 8 Hardening

Debian 8 Hardening

  1. Update root's mail recipient. Open /etc/aliases replacing administrator@example.tld with an administrator's email address. This is where logs will be emailed.

    root:     administrator@example.tld
    
  2. Update the the default umask to 027. Edit the file /etc/init.d/rc and change the following setting:

umask 027

@hsmiranda
hsmiranda / pentest.sh
Created May 19, 2019 03:41 — forked from OffXec/pentest.sh
Installs pentesting tools, then symlinks them to be ran seamlessly.
#/bin/bash
git clone https://github.com/danielmiessler/SecLists.git /opt/seclists
git clone https://github.com/s0md3v/XSStrike.git /opt/xsstrike
sudo ln -s /opt/xsstrike/xsstrike.py /usr/local/bin/xsstrike
chmod +x /opt/xsstrike/xsstrike.py
git clone https://github.com/s0md3v/Arjun.git /opt/arjun
sudo ln -s /opt/arjun/arjun.py /usr/local/bin/arjun
@hsmiranda
hsmiranda / kube-registry.yaml
Created June 27, 2019 14:21 — forked from coco98/kube-registry.yaml
Docker registry on minikube
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
@hsmiranda
hsmiranda / vimrc
Created July 9, 2019 20:31
My vimrc :)
" VIMrc do Herberson - hmiranda@0fx66.com
" Criado em 19-01-2017
" Alterado em 19-01-2017
"
execute pathogen#infect()
" Sintaxe colorida
syntax on
" Configura historico
@hsmiranda
hsmiranda / vagrant-kvm.md
Created September 25, 2019 14:04 — forked from yuanying/vagrant-kvm.md
How to use vagrant-kvm

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@hsmiranda
hsmiranda / openvas-automate.sh
Created November 26, 2019 08:29 — forked from mgeeky/openvas-automate.sh
OpenVAS automation script.
#!/bin/bash
#
# OpenVAS automation script.
# Mariusz B. / mgeeky, '17
# v0.2
#
trap ctrl_c INT
# --- CONFIGURATION ---
@hsmiranda
hsmiranda / remote_crc.md
Created May 9, 2020 02:35 — forked from tmckayus/remote_crc.md
Running 'crc' on a remote server

Overview: running crc on a remote server

This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The instructions here were tested with F