Skip to content

Instantly share code, notes, and snippets.

View tomhermans's full-sized avatar
👻
tinkering

Tom Hermans tomhermans

👻
tinkering
View GitHub Profile
chmod 600 wp-config.php
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
<?php
namespace YourPlugin\Blocks;
abstract class Block{
/**
* Block title
*
* @var string
{
"React Stateless Functional Component": {
"prefix": "rfac",
"body": [
"import React from 'react'",
"",
"const $TM_FILENAME_BASE = () => { ",
"\treturn (",
"\t\t<div>",
"",
@font-face {
font-family: 'Inter'; /* v3.11 */
font-style: normal;
font-weight: 400;
src: url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAADK8AA4AAAAAcuwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAAjJAAAACsAAAAuAkUCbUdQT1MAACNQAAAG2QAAHSa0FrhtR1NVQgAAKiwAAAiOAAAjFrGWVndPUy8yAAAhyAAAAFEAAABggKJ82GNtYXAAACIcAAAAOwAAAGAAGwJFZ2FzcAAAIxwAAAAIAAAACP//AANnbHlmAAABRAAAHOsAACo2iAHLmGhlYWQAAB/EAAAANgAAADYnUzaRaGhlYQAAIagAAAAfAAAAJB71EI9obXR4AAAf/AAAAasAAAMIOf6DtWxvY2EAAB5MAAABdwAAAYbyJ+fUbWF4cAAAHjAAAAAcAAAAIADZAOduYW1lAAAiWAAAAK0AAAFkGpw0V3Bvc3QAACMIAAAAEwAAACD+MwDAeNp9egFAVFX29z33vXkzGOowDIBFxjgIrGtGDgj9c42v1f1Ty7bYx6p/Q5sVIjQyZFFJTSciJcUiJZYIlRSVDAUVkxRtUlQssknRWJs1bKmPdWdr1tAGmHfnO/e9QSG/vsb3Zt6Pc88953fvOffc+yKUdPjcdKqOEIGMJgQEsxA8LjohfoplcmiIUaJ6Y4+x5PFFix7HS0f6kzX2n9z8gV/E5yNtmmShVkf00QRV6LVERwkhqDWOEMmO0D3kPkJMwSbBHGxKNCmXRVAurUm5gP+xY57smdc2j30eCZPT2flIeACfqA5v8GAkO5cOkyLZF/PkfVSXLntoktxGk9oowbusXG2MtMltAqHcixofkbICCIklD5KHCIGEKBJjGgthQTHRBP2KSkywhISKoWHmSRATFDZWCDFSURsSNA0S4ifBAyAEjYIQ41
@IanColdwater
IanColdwater / twittermute.txt
Last active August 18, 2025 07:02
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@denjaland
denjaland / webpaxk.mix.js
Created April 3, 2020 13:14
laravel mix
let mix = require('laravel-mix');
let tailwindcss = require('tailwindcss');
let atImport = require('postcss-import');
let glob = require("glob-all");
let PurgecssPlugin = require("purgecss-webpack-plugin");
const TailwindExtractor = (content) => {
return content.match(/[A-Za-z0-9-_/:]*[A-Za-z0-9-_/]+/g) || [];
}

Add Authentication with Auth0 to a Gatsby site

All the pieces of authentication are possible in Gatsby. Thanks to Auth0, setting it up doesn't have to be so cumbersome!

This setup comes straight from Auth0's official quick start for React.


The first step is installing the official Auth0 SDK for JavaScript from npm.

@laosb
laosb / jsonBinApi.js
Created July 8, 2020 13:28
Simple API wrapper for JSONBin.io.
import fetch from 'node-fetch'
const secretKey = process.env.JSONBIN_SECRET_KEY
const basicHeaders = () => ({
'Content-Type': 'application/json',
'X-Master-Key': secretKey,
})
export const createBin = async (
@ivandoric
ivandoric / index.php
Last active May 23, 2023 19:23
WordPress Rest API Add Posts From Frontend (Video Tutorials Notes) - Check out the video: https://www.youtube.com/watch?v=_w4Ok-lI48g
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/style.css">
<title>Watch Learn Theme</title>
</head>
<body>
<h1>Hello World</h1>