Skip to content

Instantly share code, notes, and snippets.

View diericx's full-sized avatar

Zac Holland diericx

View GitHub Profile
@diericx
diericx / crash.log
Created July 22, 2023 15:11
Valheim Crash
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Valheim [78353]
Path: /Users/USER/*/Valheim.app/Contents/MacOS/Valheim
Identifier: unity.IronGate.Valheim-macOS-Custom
Version: 0.216.9 (0)
Code Type: ARM-64 (Translated)
Parent Process: launchd [1]

My-Website

This repo contains my blog website.

Local development

Here are some notes on local development.

Starting web server

20-6-12 06:43:15.3|Info|NzbSearchService|Searching 1 indexers for [The Last Dance : S01]
20-6-12 06:43:15.3|Trace|EventAggregator|Publishing CommandUpdatedEvent
20-6-12 06:43:15.3|Trace|EventAggregator|CommandUpdatedEvent -> CommandModule
20-6-12 06:43:15.3|Trace|EventAggregator|CommandUpdatedEvent <- CommandModule
20-6-12 06:43:15.3|Trace|EventAggregator|CommandUpdatedEvent -> CommandModule
20-6-12 06:43:15.3|Trace|EventAggregator|CommandUpdatedEvent <- CommandModule
20-6-12 06:43:15.3|Debug|Torznab|Downloading Feed http://192.168.1.71:9117/api/v2.0/indexers/<omitted-tracker>/results/torznab?t=tvsearch&cat=5000,5020,5030,5040,5070,5080,100027&extended=1&apikey=(removed)&offset=0&limit=100&q=Last%20Dance&season=1
20-6-12 06:43:15.3|Trace|HttpClient|Req: [GET] http://192.168.1.71:9117/api/v2.0/indexers/<omitted-tracker>/results/torznab?t=tvsearch&cat=5000,5020,5030,5040,5070,5080,100027&extended=1&apikey=(removed)&offset=0&limit=100&q=Last%20Dance&season=1
20-6-12 06:43:15.3|Trace|ConfigService|Using default c
import os
dirs = [d for d in os.listdir(os.getcwd()) if os.path.isdir(d)]
for directory in dirs:
dotIndex = directory.find(". ")
if dotIndex >= 0:
newDirectory = directory[dotIndex+2:]
os.rename(directory, newDirectory)
package main
import (
"encoding/base64"
"encoding/json"
"log"
"net"
"net/http"
"time"
// Small gif that we will serve
var gif = []byte{
71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 0, 0, 0, 0, 0,
255, 255, 255, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0,
1, 0, 1, 0, 0, 2, 1, 68, 0, 59,
}
type Track struct {
ID int `json:"id"`
UserID string `json:"userId"`
FpHash string `json:"fpHash"` // fingerprint hash
PageURL string `json:"pageURL"` // optional (website specific)
PagePath string `json:"pagePath"` // optional ()
PageTitle string `json:"pageTitle"`
PageReferrer string `json:"pageReferrer"`
Event string `json:"event"`
CampaignSource string `json:"campaignSource"`
fetch('//cdn.jsdelivr.net/npm/fingerprintjs2@v2.1.0/dist/fingerprint2.min.js')
.then(response => response.text())
.then(text => eval(text))
.then(() => {
Fingerprint2.get(function (components) {
console.log(components) // an array of components: {key: ..., value: ...}
var values = components.map(function (component) { return component.value })
var murmur = Fingerprint2.x64hash128(values.join(''), 31)
console.log(murmur)
})
@diericx
diericx / bad.js
Created September 10, 2019 18:20
function Bad({onEvent}) {
if (some condition) {
onEvent();
}
return <h1>Uh oh</h1>;
}
import React, { Component } from "react";
import { Rect } from "react-konva";
import { CLASS_IDS } from "../../lib/environmentApi";
class EntityRect extends React.Component {
handleClick = () => {
this.setState({
clicked: true
});
};