Skip to content

Instantly share code, notes, and snippets.

View c0psrul3's full-sized avatar

Mike c0psrul3

View GitHub Profile
1..1024 | % {$test= new-object system.Net.Sockets.TcpClient; $wait = $test.beginConnect("allports.exposed",$_,$null,$null); ($wait.asyncwaithandle.waitone(250,$false)); if($test.Connected){echo "$_ open"}else{echo "$_ closed"}} | select-string " "
@c0psrul3
c0psrul3 / Makefile
Created April 20, 2016 21:37 — forked from thomascube/Makefile
Roundcube release scripts
GITREMOTE=git://github.com/roundcube/roundcubemail.git
GITBRANCH=master
VERSION=1.1.0
all: clean dist dependent framework
dist: roundcubemail-git toolchain
cp -r roundcubemail-git roundcubemail-$(VERSION)
(cd roundcubemail-$(VERSION); cp composer.json-dist composer.json)
(cd roundcubemail-$(VERSION); patch -p0 < ../dist.diff)
#!/usr/local/bin/bash
# shell script hardening
set -euf -o pipefail
#
# Lets Encrypt Certificate Generator
# https://calomel.org/lets_encrypt_client.html
# lets_encrypt.sh v0.04
#
@c0psrul3
c0psrul3 / filebeat-index-template.json
Created September 12, 2016 18:09 — forked from thisismitch/filebeat-index-template.json
Filebeat configuration with comments removed
{
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"norms": {
"enabled": false
}
},
"dynamic_templates": [
@c0psrul3
c0psrul3 / ELK_STACK.sh
Created September 22, 2016 12:20 — forked from aljoantony/ELK_STACK.sh
ELK
#!/bin/bash
###########
# Script install and configure ELK stack Server and can be used for adding new clients to this stack.
# Last modified 3/3/2016
# Author: Aljo Antony
###########
# Define colors in case we decide to use them
color() {
Red='\e[0;31m'
@c0psrul3
c0psrul3 / rootpw_pre-ecrypted_saved.txt.md
Created September 28, 2016 20:27
encrypted root password KNOWN - for distribution (CentOS)
@c0psrul3
c0psrul3 / ruby__rvm__gem__rc_paths.txt.md
Created September 28, 2016 20:43
Ruby *gem path*, rc config, *rvm* setup

Ruby gem path, rc config, rvm setup

  • Sounds like you want the command export for setting environment variables:
export PATH=$PATH':/path/to/add'
export GEM_HOME=$HOME/.gem
export GEM_PATH=$HOME/.gem
  • That will only take effect for the current session, though. To make them more permanent, add those lines to your ~/.bashrc.
@c0psrul3
c0psrul3 / logstash__grok__syslogs.txt.md
Created September 28, 2016 21:41
Logstash with Grok for Syslog forwarded messages