The mermaid editor on github not super awesomel; try it over here:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: kc868-a64 | |
friendly_name: KC868-A64 | |
esp32: | |
board: esp32dev | |
framework: | |
type: arduino | |
# Enable logging |
I hereby claim:
- I am chuyskywalker on github.
- I am chuyskywalker (https://keybase.io/chuyskywalker) on keybase.
- I have a public key whose fingerprint is 45FC 2659 BCE7 ECCB 629D 3BE7 5A27 4011 BC1A 6F11
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// when the document is fully loaded, run this function | |
$(document).ready(function(){ | |
// find every checkbox | |
$('input[type="checkbox"]') | |
// and bind to the click method to run this function | |
.click(function(){ | |
// create a variable called "box_value" which has the string from the current element's "value" attribute. | |
// $(this), in the current context, refers to the input-checkbox that is experiencing a click event | |
var box_value = $(this).attr("value"); | |
// since the "value" matches the class name, we can start a selector $() which combines a dot and the box_value variable to form a proper class name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// second variant, splits process among cores and creates a unique file for each. MUCH faster, but incurs randomness penelty | |
import ( | |
"fmt" | |
"os" | |
"math" | |
"math/rand" | |
"strconv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import logging | |
import pprint | |
import random | |
from threading import Thread, Event | |
class lastPerThread(logging.Handler): | |
""" | |
A log handler which keeps the last log message availble per thread | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo '<pre>'; | |
/* | |
Have a table like | |
CREATE TABLE `inty` ( | |
`biu` bigint unsigned NOT NULL AUTO_INCREMENT, | |
`bis` bigint NOT NULL , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Make your Hue lights dance -- a very rudimentary Hue control script | |
*/ | |
$ip = 'your-ip-here'; | |
$user = 'your-username-here'; | |
$lights = array_flip(array(1,2)); // 3,4,5, etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require './defs.php'; | |
$gearmanClient = new GearmanClient(); | |
$gearmanClient->addServer(); | |
$modelsToRun = [ | |
ModelA::CLASS, | |
ModelB::CLASS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# echo '{"test":123, "peso": [1,2,3]}' | docker run -i --rm --networking=false app /bin/bash -c 'cat - | php app.php' | |
object(stdClass)#1 (2) { | |
["test"]=> | |
int(123) | |
["peso"]=> | |
array(3) { | |
[0]=> | |
int(1) | |
[1]=> | |
int(2) |
NewerOlder