Skip to content

Instantly share code, notes, and snippets.

View jonleopard's full-sized avatar
ಠ_ಠ

Jon Leopard jonleopard

ಠ_ಠ
View GitHub Profile
TRC runtime error: invalid memory address or nil pointer dereference
goroutine 5 [running]:
runtime/debug.Stack()
/usr/local/Cellar/go/1.19.5/libexec/src/runtime/debug/stack.go:24 +0x65
main.(*application).serverError(0xc000280720, {0x1523030, 0xc0000b42a0}, {0x15203a0?, 0xc00040f3e0?})
/Users/jon/projects/golang-learning/letsgo/mailmon/cmd/web/helpers.go:48 +0x66
main.(*application).recoverPanic.func1.1()
/Users/jon/projects/golang-learning/letsgo/mailmon/cmd/web/middleware.go:51 +0x157
panic({0x140b340, 0x178e830})
/usr/local/Cellar/go/1.19.5/libexec/src/runtime/panic.go:884 +0x212
// ./src/utils/api-client.js
import {queryCache} from 'react-query'
import * as auth from 'auth-provider'
const apiURL = process.env.REACT_APP_API_URL
async function client(
endpoint,
{data, token, headers: customHeaders, ...customConfig} = {},
) {
#!/bin/sh
arcSummary="$(python /usr/local/www/freenasUI/tools/arc_summary.py)"
pools="$(zpool list -H -o name)"
echo ""
echo "[LIST]"
echo "[*]Put your data type(s) here..."
echo "[*]$(uptime)"
@jonleopard
jonleopard / cloudflared
Created May 28, 2018 16:09
cloudflared conf
# Commandline args for cloudflared
CLOUDFLARED_OPTS=--port 53 --upstream https://1.1.1.1/dns-query https://1.0.0.1/dns-query https://2606:4700:4700::1111/dns-query https://2606:4700:4700::1001/dns-query
@jonleopard
jonleopard / script_orange_eth0_TV.sh
Last active December 17, 2020 16:17
script_orange_eth0_TV.sh
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
configure
set firewall source-validation disable
set interfaces ethernet eth0 vif 838 address dhcp
set interfaces ethernet eth0 vif 838 dhcp-options client-option "send vendor-class-identifier "sagem";"
set interfaces ethernet eth0 vif 838 dhcp-options client-option "send user-class "\047FSVDSL_livebox.MLTV.softathome.Livebox4";"
import { createGlobalStyle } from 'styled-components';
// from the console: Unknown property name
// .markdown h1 {
// @apply text-4xl font-bold my-2: ;
// }
//
const GlobalMarkdownStyles = createGlobalStyle`
.markdown {
@jonleopard
jonleopard / script_orange_ipv6.sh
Last active May 15, 2020 12:20
script_orange_ipv6
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
configure
# The following I have configured in the GUI.
# You may do so if you wish, otherwise run the
# whole script.
#set firewall ipv6-name WAN_IN-6 rule 3003 action accept
#set firewall ipv6-name WAN_IN-6 rule 3003 protocol icmpv6
@jonleopard
jonleopard / docker-compose.yml
Last active May 5, 2020 13:52
goreddit docker-compose.yml
version: '3.8'
services:
db:
image: postgres
environment:
POSTGRES_DB: mydbname
POSTGRES_USER: mydbuser
POSTGRES_PASSWORD: mydbpwd
ports:
@jonleopard
jonleopard / docker-compose.yml
Last active May 5, 2020 12:14
migrate issue
version: '3.8'
services:
db:
image: postgres
environment:
POSTGRES_DB: mydbname
POSTGRES_USER: mydbuser
POSTGRES_PASSWORD: mydbpwd
ports:
@jonleopard
jonleopard / likeDelete.js
Created June 21, 2018 12:36
Twitter Like Delete
// For Broski
// Log into Twitter on the web
// open your Developer Console e.g. Developer -> Developer Tools -> Console
// and paste in this code:
var cnt=1;
var interval = setInterval(clearFavs, 1500);
function clearFavs() {
cnt+=1;