How to export source content within div to text/html file

You could use something like this: Updated jsfiddle with download btn(jquery) Initial jsfiddle with plain js and autoexecution html <div id=”main”> <span>Hey there</span> </div> html – Edit (Added a link to perform this action) <a href=”#” id=”downloadLink”>Download the inner html</a> Js function downloadInnerHtml(filename, elId, mimeType) { var elHtml = document.getElementById(elId).innerHTML; var link = document.createElement(‘a’); mimeType … Read more

kernel symbol marked with “T” in /proc/kallsyms is not exported

Mark “T” in /proc/kallsyms means that symbol is globally visible, and can be used in other kernel’s code (e.g. by drivers, compiled built-in). But for being usable in kernel module’s code, symbol is needed to be exported using EXPORT_SYMBOL or similar. List of exported symbols is maintained separately from list of all symbols in the … Read more

How to export / dump a MySql table into a text file including the field names (aka headers or column names)

Piping the query to the commandline client outputs a tab separated list with the column names as the first line $ echo “select * from surveys limit 5” | mysql -uroot -pGandalf surveys phone param1 param2 param3 param4 p0 p1 p2 p3 audio4 code time XXXXXXXXX 2008-07-02 11:17:23 XXXXXXXX SAT – – – – – … Read more

How to generate an .xlsx using php

SimpleXLSXGen $books = [ [‘ISBN’, ‘title’, ‘author’, ‘publisher’, ‘ctry’ ], [618260307, ‘The Hobbit’, ‘J. R. R. Tolkien’, ‘Houghton Mifflin’, ‘USA’], [908606664, ‘Slinky Malinki’, ‘Lynley Dodd’, ‘Mallinson Rendel’, ‘NZ’] ]; $xlsx = Shuchkin\SimpleXLSXGen::fromArray( $books ); $xlsx->saveAs(‘books.xlsx’); // $xlsx->downloadAs(‘books.xlsx’);