Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
| $.ajaxSetup({ | |
| beforeSend: function(xhr, settings) { | |
| if (settings.type == 'POST' || settings.type == 'PUT' || settings.type == 'DELETE') { | |
| function getCookie(name) { | |
| var cookieValue = null; | |
| if (document.cookie && document.cookie != '') { | |
| var cookies = document.cookie.split(';'); | |
| for (var i = 0; i < cookies.length; i++) { | |
| var cookie = jQuery.trim(cookies[i]); | |
| // Does this cookie string begin with the name we want? |
| // use keys as search and values as replace | |
| function str_replace_assoc(array $replace, $subject) { | |
| return str_replace(array_keys($replace), array_values($replace), $subject); | |
| } |
| <?php | |
| $files = array_slice($argv, 1); | |
| foreach ($files as $file) { | |
| $picture = file_get_contents($file); | |
| $size = getimagesize($file); | |
| // base64 encode the binary data, then break it into chunks according to RFC 2045 semantics | |
| $base64 = chunk_split(base64_encode($picture)); |
| #!/usr/bin/env python | |
| """ | |
| Very simple HTTP server in python (Updated for Python 3.7) | |
| Usage: | |
| ./dummy-web-server.py -h | |
| ./dummy-web-server.py -l localhost -p 8000 | |
| Send a GET request: |
| Class Main { | |
| public void bfs() | |
| { | |
| // BFS uses Queue data structure | |
| Queue queue = new LinkedList(); | |
| queue.add(this.rootNode); | |
| printNode(this.rootNode); | |
| rootNode.visited = true; | |
| while(!queue.isEmpty()) { | |
| Node node = (Node)queue.remove(); |
| <?php | |
| $url = 'http://en.wikipedia.org/wiki/1,1,1-Trichloroethane'; // example | |
| $config = HTMLPurifier_Config::createDefault(); | |
| $config->set('URI.Base', $url); // set the base URL (overrides a <base element in the HTML head?) | |
| $config->set('URI.MakeAbsolute', true); // make all URLs absolute using the base URL set above | |
| $config->set('AutoFormat.RemoveEmpty', true); // remove empty elements | |
| $config->set('HTML.Doctype', 'XHTML 1.0 Strict'); // valid XML output (?) | |
| $config->set('HTML.AllowedElements', array('p', 'div', 'a', 'br', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'ul', 'ol', 'li', 'b', 'i')); |