Skip to content

Instantly share code, notes, and snippets.

View wildone's full-sized avatar
🎯
Focusing

Max Barrass wildone

🎯
Focusing
View GitHub Profile
@wildone
wildone / fix_virtualenv
Created January 18, 2018 02:44 — forked from ttimasdf/fix_virtualenv
Fix python virtualenv after python update, forked version for choice of python executable
#!/usr/bin/env bash
ENV_PATH="$(dirname "$(dirname "$(which pip)")")"
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)"
echo "Ensure the root of current virtualenv:"
echo " $ENV_PATH"
read -p "‼️ Say no if you are not sure (y/N) " -n 1 -r
echo
PYEXC_DEF="$(sed -n '1s/^#!//p' $SYSTEM_VIRTUALENV)"
read -p "🐍 Choose which python to use? [$PYEXC_DEF] " PYEXC
@wildone
wildone / solr-filter.conf
Created August 13, 2018 19:27 — 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

Keybase proof

I hereby claim:

  • I am wildone on github.
  • I am maxbarrass (https://keybase.io/maxbarrass) on keybase.
  • I have a public key ASAxoYdiRTDAhfH75sFZNU80hJLVWrMrDkqzCcXGxIhImQo

To claim this, I am signing this object:

@wildone
wildone / PiHole Extra Block List
Last active March 20, 2020 01:06
Here is a list of things that https://github.com/cshawaus gave me :D, I've added a few things to it, just add this to blocklist in PiHole.
https://gist.githubusercontent.com/anudeepND/adac7982307fec6ee23605e281a57f1a/raw/5b8582b906a9497624c3f3187a49ebc23a9cf2fb/Test.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adaway.org/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adblock-nocoin-list/list.txt
@wildone
wildone / text-strings-to-anchor
Last active April 30, 2020 04:44
Convert Strings into Anchor tags using Regex and Javascript
"If you are looking to fix strings that look like urls in text and convert them to ulrs like this https://www.example.ru http://www.example.com www.example.com.au example.co.jp http://blog.example.app http://www.example.com/product http://www.example.com/products?id=1&page=2 http://www.example.com#up http://255.255.255.255 255.255.255.255 http:// www.site.com:8008 you can use Regex in javascript to replace strings with a format of you liking even if a url is at the end of your string like google.com".replace(/((\w+:\/\/\S+)|(\w+[\.:]\w+\S+))[^\s,\.]/mg,'<a href="$&" target="_blank">$&</a>')
@wildone
wildone / convert-docx-to-md-with-images
Last active May 11, 2020 12:33
If you have a DOCX with images and would like to convert it to MD to publish somewhere run this command in the folder with your document. This will mount the folder into docker container, convert document and extract all images into subfolder.
docker run -v ${pwd}:/data pandoc/core -o test2.md --extract-media=./test2/ test2.docx
@wildone
wildone / squid.conf
Last active June 3, 2020 02:34
Basic SQUID proxy config for running Squid in Docker with Local and Docker LAN allowed
# Description:
# Basic SQUID proxy config for running Squid in Docker with Local and Docker LAN allowed
#
# Uage:
# docker run --name squid -d --restart=always --publish 3128:3128 --volume ${pwd}\squid.conf:/etc/squid/squid.conf sameersbn/squid
#
# TAG: acl
# Defining an Access List
acl SSL_ports port 443
@wildone
wildone / readme.md
Last active June 13, 2020 14:12
setup kong api gateway and gui
@wildone
wildone / Powershell wait for URL
Last active June 15, 2020 12:19
Powershell wait for URL
function WaitForUrlContent {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true)]
[string]$ResponseContentNoPresent,
[Parameter(Mandatory=$false)]
[string]$Url="http://localhost:4502",
@wildone
wildone / Powershell Export content using FileVault
Created June 15, 2020 12:20
Powershell Export content using FileVault
# Download and extract Filevault from https://github.com/aem-design/jackrabbit-filevault/releases run this in the extracted folder.
#equivalent of using localhost in docker container
Set-Variable -name SOURCE_HOST -value "localhost"
# TCP port SOURCE_CQ listens on
Set-Variable -name SOURCE_PORT -value "4502"
# AEM Admin user for SOURCE_HOST
Set-Variable -name SOURCE_AEM_USER -value "admin"
# AEM Admin password for SOURCE_HOST
Set-Variable -name SOURCE_AEM_PASSWORD -value "admin"