Skip to content

Instantly share code, notes, and snippets.

View HendrikRoth's full-sized avatar

Hendrik Roth HendrikRoth

  • Dusseldorf, Germany
View GitHub Profile
@HendrikRoth
HendrikRoth / ColorPicker.tsx
Created April 15, 2023 00:14 — forked from devstojko/ColorPicker.tsx
Payload Input - ColorPicker
import React, { useCallback } from "react";
import { useField, withCondition } from "payload/components/forms";
import { TextField } from "payload/dist/fields/config/types";
import ColorInput from "../PayloadInput";
import { text } from "payload/dist/fields/validations";
export type Props = Omit<TextField, "type"> & {
path?: string;
@HendrikRoth
HendrikRoth / LinkBlock.ts
Created January 6, 2023 00:05 — forked from ozbeksu/LinkBlock.ts
PayloadCMS Revursive Block
import {Block} from 'payload/types';
const createRecursiveLinksBlock = (current = 0, maxDepth = 3): Block => {
if (current < maxDepth - 1) {
current++;
return {
slug: `Level ${current}`,
fields: [
{
name: 'name',
@HendrikRoth
HendrikRoth / +page.server.ts
Last active December 11, 2023 15:45 — forked from AlessioGr/PayloadCommunicator.ts
Simple helper you can use to communicate with Payload CMS from your application via their REST API. Authorization via API key needs to be enabled in your users collection. More on enabling API keys here: https://payloadcms.com/docs/authentication/config#api-keys
import { getDocumentByID } from "./PayloadCommunicator.ts";
import type { PageServerLoad } from './$types';
export const load = (async ({ params }) => {
return await getDocumentByID('collection', params.id);
}) satisfies PageServerLoad;
https://vector-realestate.com
https://vector-realestate.com/#/unternehmen
https://vector-realestate.com/#/unternehmen#profil
https://vector-realestate.com/#/unternehmen#grundwerte
https://vector-realestate.com/#/projekte
https://vector-realestate.com/#/projekte#referenzen
https://vector-realestate.com/#/news
https://vector-realestate.com/#/kontakt
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gladevcp 0.0 -->
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="HAL_HideTable" id="hal_hidetable1">
<property name="visible">True</property>
G38.2 Z-15 F100; Probe Z
G92 Z5; Set zero Z (5mm calibration plate thickness)
G91 G0 Z3; Lift 3mm (z)
G91 G0 X-60; Move 60mm to left (x)
G91 G0 Z-6; Move 6mm down (z)
G38.2 X50 F100; Probe X
G92 X-13.10; Set zero X (-10.10mm calibration plate thickness -1/2 tool thickness)
G91 G0 X-3; Move 3mm left (x)
G91 G0 Z6; Lift 6mm (z)
G91 G0 Y-60; Move 60mm to front (y)
@HendrikRoth
HendrikRoth / app.js
Created August 13, 2017 03:47 — forked from shibukawa/app.js
mithril lazy loading
var m = require("mithril");
m.mount(document.querySelector("#menu"), {
view: function() {
return m("ul", [
m("li", m('a[href="/a"]', {config: m.route}, "module A")),
m("li", m('a[href="/b"]', {config: m.route}, "module B")),
m("li", m('a[href="/c"]', {config: m.route}, "module C"))
]);
}
@HendrikRoth
HendrikRoth / install-node-pi.sh
Last active January 31, 2018 11:45 — forked from myrtleTree33/install-node-pi.sh
Install Node JS in 30 seconds for Raspberry Pi / ARM
#!/bin/bash
## Check for versions compiled with ARM at http://nodejs.org/dist/
## Inspired by http://oskarhane.com/raspberry-pi-install-node-js-and-npm/
## Fill in the Node Version here:
##########################################################################
NODE_VERSION="v8.2.1"
#!/bin/bash
#enable job control in script
set -m
# when /etc/couchdb (contains i.g. admin account) was not allready moved to persistant storage, do it and symlink the org. directory
if [ ! -d /var/lib/couchdb/etc/couchdb ]; then
mkdir /var/lib/couchdb/etc
mv /etc/couchdb /var/lib/couchdb/etc/
ln -s /var/lib/couchdb/etc/couchdb/ /etc/couchdb
#!/bin/bash
# Start / stop streamer daemon
case "$1" in
start)
sudo -u pi /home/pi/scripts/webcamDaemon >/dev/null 2>&1 &
echo "$0: started"
;;
stop)
pkill -x webcamDaemon