Skip to content

Instantly share code, notes, and snippets.

@odevodyssey
odevodyssey / dhcp
Created February 9, 2022 14:46
RPi4 Non DSA VLANs Switch Config - OpenWrt 21.02
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
@odevodyssey
odevodyssey / dhcp
Last active May 31, 2023 04:03
RPi4 DSA VLANs Switch Config - OpenWrt 21.02
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
@odevodyssey
odevodyssey / dhcp
Last active December 29, 2022 14:56
RPi4 DSA VLANs Router Config - OpenWrt 21.02
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
@odevodyssey
odevodyssey / wireless
Last active September 30, 2022 12:58
Wireless Config OpenWrt Raspberry Pi
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option country 'US'
option htmode 'VHT40'
option hwmode '11a'
option channel 'auto'
option cell_density '0'
config wifi-iface 'default_radio0'
// usage: node pdf-parser-express
// the below packages are required to run this server, and can be installed with npm
const express = require('express')
const bodyParser = require('body-parser')
const pdf = require('pdf-parse')
const crawler = require('crawler-request')
const multer = require('multer')
//var upload = multer({ dest: 'uploads/' })
const $ = cheerio.load(pm.response.text());
let siteName = $('.top > .action-post-job').text();
var things1 = [];
var things2 = [];
$('table#jobsboard tr.job').each((index,element) => {
things1.push({
let template = `
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>
</head>
<body>
<div>
<div>
<input id="filter" style="width:450px;" type="text" placeholder="Example query: //slide">
</div>
const res = pm.response.json();
// -----------------------------
// - Structure data for charts -
// -----------------------------
// EDIT THIS OBJECT TO BIND YOUR DATA
const vizData = {
symbol: res.symbol,
@odevodyssey
odevodyssey / createAPIExample.yml
Created November 4, 2019 17:05
Example of OpenAPI 3.0 (yaml)
openapi: "3.0.0"
info:
title: Simple API overview
version: 2.0.0
paths:
/:
get:
parameters:
- in: query
name: resp
@odevodyssey
odevodyssey / cheerioExamples.js
Created October 25, 2019 03:16
Examples of Cheerio.js methods and their usage
const cheerio = require('cheerio')
const responseBody = "<?xml version='1.0' encoding='us-ascii'?> \
<!-- A SAMPLE set of slides --> \
<soap-env:envelope> \
<soap-env:header> \
<wsse:security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">Assertion Here</wsse:security> \
</soap-env:header> \
<soap-env:body> \
<slideshow \