- Fix error parsing
- Add missing
yield
in thelogin
function
<?php | |
parse_str($options, $options); | |
$options = array_merge(array( | |
'ul' => 0 | |
), $options); | |
$lines = preg_split('/\n\r?/', trim($input)); | |
$output = '<li>' . implode('</li><li>', $lines) . '</li>'; | |
if ($options['ul']) { |
#!/usr/bin/env python | |
""" | |
Warm the caches of your website by crawling each page defined in sitemap.xml (can use a local file or an URL). | |
To use, download this file and make it executable. Then run: | |
./cache-warmer.py --threads 4 --url http://example.com/sitemap.xml -v | |
""" | |
import argparse | |
import multiprocessing.pool as mpool | |
import os.path | |
import re |
(function(window,undefined){ | |
// Prepare our Variables | |
var | |
document = window.document, | |
$ = window.jQuery; | |
// Wait for Document | |
$(window).bind(function(){ | |
// Prepare Variables |
#!/usr/bin/env python3 | |
""" | |
Display gluster traffic | |
This tool uses gluster profiling feature, parsing cumulative statistics. | |
To understand correctly the results, you have to divide overall write statistics with number of replicas. | |
Also striped volumes needs to be taken in mind - overall statistics just print sum of all bricks | |
read/written bytes. |
#!/usr/bin/env ruby | |
require 'tmpdir' | |
require 'fileutils' | |
dir = Dir.tmpdir() | |
if File.directory?("#{dir}/bulma") | |
FileUtils.remove_dir("#{dir}/bulma") | |
end |
/** | |
* Prevent update notification for plugin | |
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/ | |
* Place in theme functions.php or at bottom of wp-config.php | |
*/ | |
function disable_plugin_updates( $value ) { | |
if ( isset($value) && is_object($value) ) { | |
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) { | |
unset( $value->response['plugin-folder/plugin.php'] ); | |
} |
How to generate graphic model Django with PyGraphViz?
sudo apt-get install -y graphviz libgraphviz-dev pkg-config
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install pygraphviz
pip uninstall pyparsing
pip install -Iv https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709