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 / gist:c6fbde582f9104d491012ea0380830bc
Created September 13, 2023 05:47
sample algorithm based on basic upload
from typedb.client import *
from loguru import logger as Logger
from posixpath import basename
import json
import copy
import os
import sys
import argparse
from datetime import datetime
gquery = "match $a isa log, has logName 'L1'; "
@wildone
wildone / gist:d3aee880d1ffe4ca8b7378665f9c31f2
Created September 6, 2023 02:06
POST a JSON to a URL with insecure or invalid SSL certs using latest JDK 11 HttpClient
```java
// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
@wildone
wildone / unclosedTagFinder.txt
Created July 26, 2017 14:27
HTML Unclosed Tag Finder
<!--demo: http://jona.ca/blog/unclosed-tag-finder/ -->
<!--source: http://jonathanaquino.com/unclosedTagFinder.txt -->
<textarea id="unclosed-tag-finder-input" style="width:100%;height:300px">
</textarea>
<div><input type="button" id="unclosed-tag-finder-button" value="Submit" ></input></div>
<br />
<h3>Results</h3>
<pre id="unclosed-tag-finder-results">
</pre>
@wildone
wildone / setup.md
Last active July 27, 2021 02:54
Setting up Windows 10 from scratch on UEFI motherboard

Setting up Windows 10 from scratch on UEFI

If you have a new motherboard that has UEFI and it detects your USB as a UEFI device and may give you issues installing.

So if you have issues you can follow these steps to move boot content from your USB to your new drive and then install will work.

1. Create bootable windows 10 disk

This will depend on which os you are using.

Windows 10 version 2004 - Installing Node.js on Windows Subsystem for Linux (WSL/WSL2)

UPDATE (Fall 2020): This gist is an updated version to the Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL) guide, I usually just keep here notes, configuration or short guides for personal use, it was nice to know it also helps other ppl, I hope this one too.

Windows updated windows subsystem for linux to version 2, as the F.A.Q stated you can still use WSL version 1 side by side with version 2. I'm not sure about existing WSL machines surviving the upgrade process, but as always backup and 🤞. NOTE: WSL version 1 is not replace/deprecated, and there ar

@wildone
wildone / Add ssh-agent to your bash start
Last active November 14, 2020 03:05
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 June 19, 2020 11:48
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 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"
@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 / readme.md
Last active June 13, 2020 14:12
setup kong api gateway and gui