Skip to content

Instantly share code, notes, and snippets.

View robertklep's full-sized avatar

Robert Klep robertklep

View GitHub Profile
@robertklep
robertklep / project.yaml
Last active April 28, 2026 18:12
ESPHome project template for the Seeed XAIO ESP32S3 with Wio SX1262 shield
## Example setup for the Seeed XIAO ESP32S3 with Wio SX1262 LoRa shield.
esphome:
name: seeedxiaowiosx1262
friendly_name: Seeed XIAO WIO SX1262
platformio_options:
upload_speed: 921600
### Optional: start breathing user LED at boot
on_boot:
light.turn_on:
id: user_led

Keybase proof

I hereby claim:

  • I am robertklep on github.
  • I am robertklep (https://keybase.io/robertklep) on keybase.
  • I have a public key whose fingerprint is F5E0 E8F1 5938 70C3 501D 2896 3CAF 44BE 0135 D038

To claim this, I am signing this object:

app.use(function(req, res, next) {
if (req.method === 'HEAD') {
res.on('finish', function() {
req.connection.end();
});
}
next();
});
public class Test {
public static void main(String[] args) {
long heapMaxSize = Runtime.getRuntime().maxMemory();
System.out.println("Max: " + heapMaxSize);
}
}
<h1>Anonymous</h1>
@robertklep
robertklep / test.js
Last active December 18, 2015 05:19
var async = require('async');
var locals = [];
var test = function(value, locals, done) {
console.log('value', value, 'locals', locals);
locals.push(value);
done();
};
async.series([
test.bind(null, 'this is #1', locals),
module.exports = function blah() {
console.log('N', this.name);
};
@robertklep
robertklep / bind.js
Last active December 18, 2015 04:59
var f = function(value) {
console.log('value:', value);
};
var x = f.bind(f, 'foo'); // pass 'foo' as a pre-specified argument to f(), and return it as a new function x()
x();
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
<img src="http://lorempixel.com/400/400">
<script>
var run = function() {
$('img')
var express = require('express');
var app = express();
app.use(express.bodyParser());
app.get('/users', function(req, res) {
console.log('B', req.body);
res.send('OK');
});