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)"
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 / 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:
<script>
export default {
name: "login",
data() {
return {
user: {
username: "",
password: ""
},
submitted: false
package main
import "fmt"
type Cat struct{}
func (c Cat) Speak() {
fmt.Println("meow")
}
import React from "react";
import { Formik } from "formik";
import * as Yup from "yup";
import styled, { keyframes } from "styled-components";
import { Mutation, Query } from "react-apollo";
import { Button, Flex, Card, Box } from "rebass";
import gql from "graphql-tag";
import Link from "./Link";
import Text from "./Text";
import Error from "./ErrorMessage";