Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
(function(window,undefined){ | |
// Prepare our Variables | |
var | |
document = window.document, | |
$ = window.jQuery; | |
// Wait for Document | |
$(window).bind(function(){ | |
// Prepare Variables |
<?php | |
/** | |
* Create a web friendly URL slug from a string. | |
* | |
* Although supported, transliteration is discouraged because | |
* 1) most web browsers support UTF-8 characters in URLs | |
* 2) transliteration causes a loss of information | |
* | |
* @author Sean Murphy <sean@iamseanmurphy.com> | |
* @copyright Copyright 2012 Sean Murphy. All rights reserved. |
Located in alphabetical order (not prefer)
C
ab
), also designed as a more modern replacement, written in C
golang
)#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
<?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 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. |
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
/** | |
* 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'] ); | |
} |