Skip to content

Instantly share code, notes, and snippets.

@conbon
conbon / logstash.conf
Created Jan 6, 2016
Logstash config for custom crawler logs
View logstash.conf
input {
file {
path => "C:\dev\data\*"
type => "crawlerlog"
start_position => "beginning"
}
}
filter {
if [type] == "crawlerlog" {
@conbon
conbon / remote_network_copy.ps1
Created Oct 6, 2017
Powershell - Copy remote files to a network drive with credentials
View remote_network_copy.ps1
$secpassword = ConvertTo-SecureString "********" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential ("**********", $secpassword)
$targetip = "*************"
$localfolder = "C:\path\to\local\folder\"
$networkfolder = "\\networkfileserver\path\to\network\folder\"
$remotefolder = "/opt/path/to/remote/folder/"
#Remove old files from local directory
if(!(Test-Path -Path $localfolder )){
New-Item -ItemType directory -Path $localfolder
View shell_one_liners.sh
# iterate dir and perform mvn commands across all subdirs - in this example 'mvn clean'
for folder in */; do folder=${folder%*/}; cd $folder; if [[ -f "pom.xml" ]]; then mvn clean; else echo "not a maven project"; fi; cd ..; done;
@conbon
conbon / Brewfile
Last active Mar 8, 2022
Brewfile - local development
View Brewfile
# Taps
tap "homebrew/cask"
tap "adoptopenjdk/openjdk"
tap "bufbuild/buf"
tap "FiloSottile/musl-cross"
tap "messense/macos-cross-toolchains"
# Casks - OSX only
# cask "vagrant"
# cask "docker"