Skip to content

Instantly share code, notes, and snippets.

View hqmatics's full-sized avatar

Tjerk Hacquebord hqmatics

View GitHub Profile
@bpolaszek
bpolaszek / bootstrap.php
Last active December 19, 2023 19:49
Symfony shortcuts for Pest
<?php
# tests/bootstrap.php
declare(strict_types=1);
namespace App\Test;
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client;
use App\Entity\User;
use App\Kernel;
{#
Name: bolt-taxonomy-navigation.twig
Description: Defining taxonomy categories and using them as navigation in Bolt. Only print out those with records assigned to them
Author: S. Bonardt
CMS: Bolt CMS - Bolt.cm
Define the categories like below in taxonomy.yml, using key and value (under 'options') i.s.o. default way. E.G:
categories:
name: Categories
@pklaus
pklaus / rpi-arch-linux-to-sdcard.sh
Last active February 6, 2020 01:09
for the Raspberry Pi 1, Zero, Zero W : Arch Linux ARM to SD Card Script; See https://gist.github.com/pklaus/9dd4a7bf040788cda501 for RPi 2
#!/bin/bash
# <http://archlinuxarm.org/platforms/armv6/raspberry-pi>
echo -e "\n\nArch Linux ARM for Raspberry Pi to SD Card"
echo -e "(Not meant for the Raspberry Pi 2 - "
echo -e " check https://gist.github.com/pklaus/9dd4a7bf040788cda501 instead.)\n\n"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
@hsiboy
hsiboy / wiegand.c
Created March 17, 2014 12:59
Wiegand API for Raspberry Pi
/*
* Wiegand API Raspberry Pi
* By Kyle Mallory All rights reserved.
* 12/01/2013
* Based on previous code by Daniel Smith (www.pagemac.com) and Ben Kent (www.pidoorman.com)
* Depends on the wiringPi library by Gordon Henterson: https://projects.drogon.net/raspberry-pi/wiringpi/
*
* This is linked with -lpthread -lwiringPi -lrt
*
* The Wiegand interface has two data lines, DATA0 and DATA1. These lines are normall held