To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
| <?php | |
| /* | |
| * dl-file.php | |
| * | |
| * Protect uploaded files with login. | |
| * | |
| * @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in | |
| * | |
| * @author hakre <http://hakre.wordpress.com/> | |
| * @license GPL-3.0+ |
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Hello FB</title> | |
| </head> | |
| <body> | |
| <div id="fb-root"></div> | |
| <div id="fb-content"></div> | |
| <div> |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
| <?php | |
| function rkv_remove_columns( $columns ) { | |
| // remove the Yoast SEO columns | |
| unset( $columns['wpseo-score'] ); | |
| unset( $columns['wpseo-title'] ); | |
| unset( $columns['wpseo-metadesc'] ); | |
| unset( $columns['wpseo-focuskw'] ); |
| <?php | |
| /** | |
| * Description of VideoStream | |
| * | |
| * @author Rana | |
| * @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial | |
| */ | |
| class VideoStream | |
| { | |
| private $path = ""; |
| #!/usr/bin/env ruby | |
| require 'houston' | |
| certificate = 'cert.pem' | |
| passphrase = '' | |
| client = Houston::Client.production | |
| client.certificate = File.read(@certificate) | |
| client.passphrase = @passphrase |
| <?php | |
| /** | |
| * Create a new custom yoast seo sitemap | |
| */ | |
| add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' ); | |
| add_action( 'init', 'init_wpseo_do_sitemap_actions' ); | |
| // Add custom index |
To clear 307 HSTS redirects in Google Chrome (if you experimenting with SSL -- you probably wouldn't want to do this for a site that you do not opperate, since it is there to protect you), go to the following URL and delete the site.
chrome://net-internals/#hsts
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
cd wkhtmltox/bin/
sudo mv wkhtmltopdf /usr/bin/wkhtmltopdf
sudo mv wkhtmltoimage /usr/bin/wkhtmltoimage
| <?php | |
| add_filter( 'get_the_archive_title', function ($title) { | |
| // archiv rubriky | |
| if ( is_category() ) { | |
| $title = single_cat_title( '', false ); | |
| // archiv štítku | |
| } elseif ( is_tag() ) { |