Skip to content

Instantly share code, notes, and snippets.

@ansell
ansell / install-java.sh
Last active April 20, 2024 01:36
Ubuntu 18.04-Mint 18 installations for Java Maven Eclipse Kotlin Gradle
#!/bin/sh
# Install Java-8
#sudo add-apt-repository ppa:webupd8team/java -y
#sudo apt-get update
#echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
#echo oracle-java9-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
#sudo apt-get install oracle-java8-installer oracle-java9-installer oracle-java9-set-default
sudo apt-get install openjdk-8-jdk
@ansell
ansell / gist:1141550
Created August 12, 2011 06:06
Maven: Compiling and installing test jar without running them
mvn -DskipTests test-compile jar:test-jar install
the similar command below, will not compile or package the jar file (if you are using the surefire plugin) so, don't use it if you want to distribute the test jar file without running the tests
mvn -Dmaven.test.skip test-compile jar:test-jar install
@ansell
ansell / disable.sh
Last active January 24, 2024 08:35
Disable bunch of services in Sierra (Version 2.1)
#!/bin/bash
# Source: https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@ansell
ansell / Base64_CheatSheet.md
Created March 8, 2022 20:42 — forked from Neo23x0/Base64_CheatSheet.md
Learning Aid - Top Base64 Encodings Table

Learning Aid - Top Base64 Encodings Table

Base64 Code Mnemonic Aid Decoded* Description
JAB 🗣 Jabber $. Variable declaration (UTF-16)
TVq 📺 Television MZ MZ header
SUVY 🚙 SUV IEX PowerShell Invoke Expression
SQBFAF 🐣 Squab favorite I.E. PowerShell Invoke Expression (UTF-16)
SQBuAH 🐣 Squab uahhh I.n. PowerShell Invoke string (UTF-16) e.g. Invoke-Mimikatz
PAA 💪 "Pah!" <. Often used by Emotet (UTF-16)
The following are the instructions to install an ssh-agent inside of WSL
Run the following:
```bash
sudo apt-get install keychain
```
then add the following to `~/.bashrc`
# Purge the following packages
account-plugin-aim
account-plugin-facebook
account-plugin-flickr
account-plugin-jabber
account-plugin-salut
account-plugin-twitter
account-plugin-windows-live
account-plugin-yahoo
@ansell
ansell / gist:eeed4577da084fa0c2506d4a1dfc2798
Created July 26, 2020 01:33 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@ansell
ansell / howto_gis_ubuntu.md
Last active March 27, 2020 09:57
Ubuntu-18.04/Mint-18 GIS hackery

Add ubuntugis PPA:

$ sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'

Add POSTGIS repository:

@ansell
ansell / install-java.sh
Created August 14, 2019 01:35
HomeBrew Revert to Java8 from Java9
#!/usr/bin/env bash
set -e
# Uninstall Java 9 off the bat, so we can fix our local installation
if brew cask ls --versions "java" &>/dev/null; then
echo "Uninstalling Java"
brew cask uninstall java
fi
# Install jenv, java8 and java9
brew install jenv
brew cask install caskroom/versions/java8
@ansell
ansell / solr-filter.conf
Created April 18, 2019 03:23 — forked from sebnmuller/solr-filter.conf
Logstash config for ingesting Solr logs
input {
file {
path => "/Users/sebastienmuller/comperio/projects/sintef/tmp/logs/indexing_logs_2/solr.log.3"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
# Extract event severity and timestamp