Skip to content

Instantly share code, notes, and snippets.

@twitnic
twitnic / wakeup.ino
Created February 28, 2024 11:41
MQB Arduino WakeUp
// CAN Send Example
//
#include <mcp_can.h>
#include <SPI.h>
MCP_CAN CAN0(10); // Set CS to pin 10
void setup()
{
##
## "The Script" is the product of years of work by me (Peter Scargill) and others, in particular Antonio Fragola (Mr Shark)
## Supports Raspberry Pi with Buster - also other boards and op systems but since 2021 this
## script is only tested on Raspberry Pi (2,3,4) (Raspberry Pi OS, formerly Buster) (full or lite, not NOOBS). See below and if you
## try it on other systems with success, please let mne know.
##
## Makes use of the official Node-Red script (which I DIDN'T write) and my own Node-Red nodes such as BigTimer.
##
## To use my own exact setup you will also need:
## sudo python -m pip install --upgrade pip setuptools wheel
@twitnic
twitnic / docker-compose.yml
Created July 22, 2022 18:16
Docker Compose für OctoberCMS
version: '3.9'
services:
web:
container_name: october
image: octobercms/october-dev:latest
volumes:
- ./octobercms:/var/www/html
ports:
- "8080:80"
- "3306:3306"
sudo apt-get update

sudo apt-get install xvfb libfontconfig wkhtmltopdf

@twitnic
twitnic / install.sh
Last active August 28, 2020 12:09
Thinkpad
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo usermod -aG docker ${USER}
@twitnic
twitnic / .php_cs
Last active June 15, 2020 20:58
(pre)PSR-12 Rules for Codestyle fixer // See: https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/4502
<?php
// command: php-cs-fixer fix -vv --config=.php_cs ./lib
$finder = PhpCsFixer\Finder::create()
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

Error:

An exception occurred in driver: SQLSTATE[HY000] [1298] Unknown or incorrect time zone: 'Europe/Berlin'

Solution:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p

@twitnic
twitnic / php_downgrade.md
Last active October 21, 2020 19:37
DRAFT - Ubuntu 20.04 - Downgrade from Php 7.4 to 7.3
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.3
sudo apt-get install php7.3-mbstring php7.3-soap php7.3-ssh2 php7.3-curl php7.3-xml php7.3-mysql php7.3-xdebug php7.3-mail php7.3-mailparse php7.3-memcache php7.3-memcached php7.3-gd php7.3-curl php7.3-cli php7.3-json php7.3-bcmath php7.3-zip
sudo a2dismod php7.2
sudo a2dismod php7.4
sudo a2enmod php7.3
sudo service apache2 restart
sudo update-alternatives --set php /usr/bin/php7.3

sudo update-alternatives --set phar /usr/bin/phar7.3

Freitag,06,September,2019,19:12:19:22038
VCDS -- Windows-basierter VAG/VAS-Emulator l‰uft auf Windows 10 x64
VCDS Version: PCI 19.6.1.0
Datenstand: 20190815 DS308.0
www.VCDSpro.de
Fahrzeug-Ident.-Nr.: XXXXXXXXXXXXXXXXXXXXXXXX KFZ-Kennzeichen: XX-XXXXX
Kilometerstand: 133050km Reparaturauftrag:
development_xxx