Skip to content

Instantly share code, notes, and snippets.

@techlemur
techlemur / block-list.bat
Last active June 7, 2024 19:50
Simple Firewall bat script for windows 10.
@echo off
setlocal enabledelayedexpansion
@REM Set directories to process here
set "DIRS=C:\Program Files\PowerToys"
@REM Add more folders like this
@REM set "DIRS=%DIRS%;PATH_GOES_HERE"
echo.

Keybase proof

I hereby claim:

  • I am techlemur on github.
  • I am techlemur (https://keybase.io/techlemur) on keybase.
  • I have a public key ASCx1glaAFyMhlIbG7SavYeezkeQjg-3-YAS9GipGVcOvQo

To claim this, I am signing this object:

@techlemur
techlemur / list_blocks.js
Created February 11, 2019 21:19
get all available gutenberg block info for your site with javascript
/* Navigate to a wordpress edit page for any post and run one of the code sections below in a javascript console to get the names/info for all blocks available to gutenberg on your site. */
/* log all block info to console */
console.log(wp.data.select( "core/blocks" ).getBlockTypes());
/* log all block names to console */
wp.data.select( "core/blocks" ).getBlockTypes().forEach(function(element) {
console.log(element['name']);
});
/* gets all available blocks and log them in console */
wp.data.select( "core/blocks" ).getBlockTypes().forEach(function(element) {
console.log(element['name']);
});
/* same thing but in a new window and formatted for php */
var win = window.open("", "Title", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=200,top="+(screen.height-400)+",left="+(screen.width-840));
var tmpContent = 'Block List<br><hr><br>array(<br>';
wp.data.select( "core/blocks" ).getBlockTypes().forEach(function(element) {
@techlemur
techlemur / AlexaPiControl.json
Last active July 24, 2018 18:29
Basic flow to have Alexa locally control a raspberry pi running node red.
[{"id":"f1de55df.5e2f88","type":"subflow","name":"Execute Shell Script","info":"","in":[{"x":100,"y":200,"wires":[{"id":"285cddd0.d7e24a"}]}],"out":[{"x":960,"y":280,"wires":[{"id":"62b058c.3afd0a8","port":0}]},{"x":960,"y":340,"wires":[{"id":"62b058c.3afd0a8","port":1}]},{"x":960,"y":400,"wires":[{"id":"62b058c.3afd0a8","port":2}]}]},{"id":"76a063c9.c6b974","type":"file","z":"f1de55df.5e2f88","name":"Write script file","filename":"","appendNewline":true,"createDir":false,"overwriteFile":"false","x":860,"y":140,"wires":[]},{"id":"d0bfe6c1.044a5","type":"exec","z":"f1de55df.5e2f88","command":"mktemp","addpay":false,"append":"","useSpawn":"","timer":"","name":"","x":420,"y":200,"wires":[["fe9bd6b2.929e7"],[],[]]},{"id":"b4a9ec57.96bc4","type":"file","z":"f1de55df.5e2f88","name":"Delete script file","filename":"","appendNewline":true,"createDir":false,"overwriteFile":"delete","x":1020,"y":480,"wires":[]},{"id":"62b058c.3afd0a8","type":"exec","z":"f1de55df.5e2f88","command":" sh ","addpay":true,"append":"","useSp