Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - tino

Tutorials / Re: ESP8266 - AT Firmware - 3.0.1
Code: [Select] erase_flash

Code: [Select]

Code: [Select] -p /dev/tty.usbserial-A603AYEQ --chip esp8266 write_flash --flash_size 2MB-c1 0x00000 boot_v1.2.bin 0x01000 at/1024+1024/ 0x1fc000 esp_init_data_default_v05.bin 0xfe000 blank.bin 0x1fb000 blank.bin 0x1fe000 blank.bin
Tutorials / ESP8266 - AT Firmware
Connect the ESP8266-12E as follows;

  • GPIO15 - GND
  • GPIO02 - VCC
  • GPIO00- GND
  • RESET - GND ( Temporarily )
  • TX - RX
  • RX - TX

  • Install

Code: [Select]
 pip install esptool 

  • Download SDK 2.2.1

Code: [Select]

  • Extract files and go to bin/
  • Run the following command and reset the chip

Code: [Select] --port /dev/tty.usbserial-A603AYEQ --baud 115200 write_flash --flash_mode dio 0x00000 boot_v1.2.bin 0x01000 at/512+512/ 0x7B000 blank.bin 0x3FC000 esp_init_data_default_v05.bin 0x7E000 blank.bin
PostgreSQL / Re: MISC Queries
Show running queries (9.2)

Code: [Select]
SELECT pid, age(query_start, clock_timestamp()), usename, query 
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;

kill running query
Code: [Select]
SELECT pg_cancel_backend(procpid);

Kill idle query
Code: [Select]
SELECT pg_terminate_backend(procpid);
PostgreSQL / MISC Queries
Compare two rows

Code: [Select]
SELECT T1.log_dt, T2.log_dt, EXTRACT(EPOCH FROM (T2.log_dt - T1.log_dt))
FROM power_data AS T1
INNER JOIN power_data  AS T2
USING ( node )
WHERE T1.log_dt > '2017-05-05 22:10:00'
AND T2.log_dt > '2017-05-05 22:10:00'