Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Max Barrass wildone

🎯
Focusing
View GitHub Profile
@wildone
wildone / Add ssh-agent to your bash start
Last active Nov 14, 2020
Add ssh-agent to your bash start
View Add ssh-agent to your bash start
Best way to use ssh keys is to add them to SSH Agent, this will will allow you use ssh without needing to specify pasword for your SSH key all the time.
To do this add these lines to you `.bash_profile` or `.profile`
```bash
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
eval `$SSHAGENT $SSHAGENTARGS`
trap "kill $SSH_AGENT_PID" 0
@wildone
wildone / Powershell Do Sling Post
Last active Jun 19, 2020
Powershell Do Sling Post
View Powershell Do Sling Post
function doSlingPost {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true)]
[string]$Url="http://localhost:4502",
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[ValidateSet('Post','Delete')]
@wildone
wildone / Powershell Export content using FileVault
Created Jun 15, 2020
Powershell Export content using FileVault
View 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"
@wildone
wildone / Powershell wait for URL
Last active Jun 15, 2020
Powershell wait for URL
View Powershell wait for URL
function WaitForUrlContent {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true)]
[string]$ResponseContentNoPresent,
[Parameter(Mandatory=$false)]
[string]$Url="http://localhost:4502",
@wildone
wildone / readme.md
Last active Jun 13, 2020
setup kong api gateway and gui
View readme.md
@wildone
wildone / squid.conf
Last active Jun 3, 2020
Basic SQUID proxy config for running Squid in Docker with Local and Docker LAN allowed
View squid.conf
# 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 / convert-docx-to-md-with-images
Last active May 11, 2020
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.
View convert-docx-to-md-with-images
docker run -v ${pwd}:/data pandoc/core -o test2.md --extract-media=./test2/ test2.docx
@wildone
wildone / text-strings-to-anchor
Last active Apr 30, 2020
Convert Strings into Anchor tags using Regex and Javascript
View text-strings-to-anchor
"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 / PiHole Extra Block List
Last active Mar 20, 2020
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.
View PiHole Extra Block List
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
View keybase.md

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:

You can’t perform that action at this time.