Skip to content

Instantly share code, notes, and snippets.

@pantaluna
pantaluna / log
Created September 11, 2018 12:06
I (842) esp_image: segment 6: paddr=0x0003d3b4 vaddr=0x40080400 size=0x0d134 ( 53556) load
I (1004) esp_image: segment 7: paddr=0x0004a4f0 vaddr=0x400c0000 size=0x00000 ( 0) load
I (1006) esp_image: segment 8: paddr=0x0004a4f8 vaddr=0x50000000 size=0x00000 ( 0) load
I (1073) boot: Loaded app from partition at offset 0x10000
I (1074) boot: Disabling RNG early entropy source...
I (1076) cpu_start: Pro cpu up.
I (1087) cpu_start: Starting app cpu, entry point is 0x40080f8c
0x40080f8c: call_start_cpu1 at C:/myiot/esp/esp-idf/components/esp32/cpu_start.c:228
I (1) cpu_start: App cpu up.
@pantaluna
pantaluna / Screencast
Created July 19, 2018 13:21
ubuntu1804-x11vnc-disconnected-monitor-fatal
https://www.dropbox.com/s/a8jjnw14uhtibzk/ubuntu1804-x11vnc-disconnected-monitor-fatal.mp4?dl=0
I (437) example: Opening file
I (457) example: File written
I (467) example: Renaming file
I (467) example: Reading file
I (467) example: Read from file: 'Hello SU04G!'
This line will be written into the log file, not to UART
@pantaluna
pantaluna / main.c
Last active January 31, 2018 10:53
/*
* MJD HARDWARE INSTRUCTIONS:
* GPIO selector (Adafruit HUZZAH32 dev board)
* #21 = SW180 tilt sensor | KY032 obstacle sensor | SW420 Vibration Sensor
*
* KY032 Sensor (or any other sensor or button that reports a digital signal 0 or 1)
* !pinvalue=1 no obstacle | pinvalue=0 yes obstacle
* Connect pin 1 (left) of the sensor to DATA
* Connect pin 2 (middle) of the sensor to GND
* Connect pin 3 (right) of the sensor to VCC
add-apt-repository "deb http://pkg.ci.collectd.org/deb trusty collectd-5.7"
gpg --recv-keys 3994D24FB8543576
gpg --export -a 3994D24FB8543576 | apt-key add -
apt-get update
apt-show-versions | egrep --ignore-case "collectd"
#OUTPUT#:
collectd:amd64/trusty 5.6.2.5.g1afa5e0-1~trusty upgradeable to 5.7.0.15.gbe6aa28-1~trusty
collectd-core:amd64/trusty 5.4.0-3ubuntu2 upgradeable to 5.7.0.15.gbe6aa28-1~trusty
collectd-utils:amd64/trusty 5.6.2.5.g1afa5e0-1~trusty upgradeable to 5.7.0.15.gbe6aa28-1~trusty
@pantaluna
pantaluna / modsecurity_crs_10_setup.conf.sh
Created November 20, 2016 12:13
Apache modsecurity_crs_10_setup.conf - Add HTTP/2.0 to the list of allowed http versions
# ***SPECIAL*** Add HTTP/2.0 to the list of allowed http versions
# Fixes the modsecurity error [id "960034"] [rev "2"] [msg "HTTP protocol version is not allowed by policy"] [data "HTTP/2.0"]
MYSCRIPT="/usr/share/modsecurity-crs/modsecurity_crs_10_setup.conf"
SEARCHTHIS="'tx.allowed_http_versions=HTTP/0.9 HTTP/1.0 HTTP/1.1'"
REPLACEWITH="'tx.allowed_http_versions=HTTP/0.9 HTTP/1.0 HTTP/1.1 HTTP/2.0'"
sed --in-place "s#${SEARCHTHIS}#${REPLACEWITH}#" ${MYSCRIPT}
grep --ignore-case "${REPLACEWITH}" ${MYSCRIPT} || echo "ERROR: the text has NOT been REPLACED!"
@pantaluna
pantaluna / Cygwin bash
Created September 28, 2016 21:14
SlimerJS page.papersize = Object
#CYGWIN>>
cd /cygdrive/c/myhtdocs/fdb-calendar-feature/calendar-image-generator
export SLIMERJSLAUNCHER="/cygdrive/c/Program Files (x86)/Mozilla Firefox/firefox.exe"
rm --verbose output-papersize*
slimerjs-0.10.0/slimerjs -debug yes dev-slimerjs-papersize.js 3507 2481 true output-papersize http://www.feestdagen-belgie.be/kalender
<?
require("redis.php");
require("json.php");
$term = $_GET['term'];
$r = new Redis("127.0.0.1","6379");
$r->connect();
$items = $r->zrangebylex("kernel","[$term","[$term\xff",Array("LIMIT","0","10"));
let getGraphChecklistById = Promise.coroutine(function*(pId) {
console.log('> getGraphChecklistById()');
let checklist = yield getChecklistById(pId);
checklist.__node__ChecklistItemGroups = yield fetchChecklistItemGroupsByChecklistId(pId); // Returns a promise.
for (let pItem of checklist.__node__ChecklistItemGroups) {
pItem.__node__ChecklistItems = yield fetchChecklistItemsByXrefId(pItem.xchlclig_id);
}
return checklist;
});
@pantaluna
pantaluna / Gruntfile.js
Created April 1, 2016 20:25
Gruntfile.js of bootstrap-4.0.0-alpha.2
grunt - build - control
/*!
* Bootstrap's Gruntfile
* http://getbootstrap.com
* Copyright 2013-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
module.exports = function (grunt) {
'use strict';