Skip to content

Instantly share code, notes, and snippets.

View rubentebogt's full-sized avatar

Ruben rubentebogt

View GitHub Profile
@gresan-gits
gresan-gits / ESP32MQTT.ino
Last active February 3, 2021 14:55
lwMQTT testing on ESP32 with Arduino
#include <WiFi.h>
#include <MQTT.h>
const char ssid[] = "ssid";
const char password[] = "pass";
WiFiClient net;
MQTTClient client;
@gresan-gits
gresan-gits / code.ino
Created February 14, 2020 10:23
ESP32 ADC Arduino
#include "esp_system.h"
#include "esp_adc_cal.h"
#include "driver/adc.h"
#define ADC_BAT_PIN 34
#define NO_OF_SAMPLES 64 //Multisampling
#define REF_VOLTAGE 1100
#define LIN_COEFF_A_SCALE 65536
@furkanmustafa
furkanmustafa / SimpleICS.php
Last active May 16, 2023 12:42
Simple ICS Generation class for PHP
<?php /*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@christiaanwesterbeek
christiaanwesterbeek / splitsAdres.js
Last active June 6, 2024 14:55
Splitsen van een nederlands adres naar straat, huisnummer en toevoeging middels een regular expression. Deutsch-Adressen werden jetzt auch unterstützt.
let re = /^(\d*[\wäöüß\d '\/\\\-\.]+)[,\s]+(\d+)\s*([\wäöüß\d\-\/]*)$/i
let adressen = [
'Dorpstraat 2',
'Dorpstr. 2',
'Laan 1933 2',
'18 Septemberplein 12',
'Kerkstraat 42-f3',
'Kerk straat 2b',
'42nd street, 1337a',
'1e Constantijn Huigensstraat 9b',
@marcelosomers
marcelosomers / git-php-webhook.php
Last active October 17, 2024 17:17
A basic webhook for deploying updates to repos on Github to your local server
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed
@jakebellacera
jakebellacera / ICS.php
Last active October 11, 2024 10:58
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*