Finding file on unix
find $directory -type f -name “*.ext”
find $directory -type f -name “*.ext”
Just use javascript:void(0) instead of # for href You might encounter this error most likely in Firefox Console
View the code on Gist.
SELECT CONCAT(‘ALTER TABLE `’, TABLE_NAME,’` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;’) AS mySQL FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA= “myschema” AND TABLE_TYPE=”BASE TABLE” Change “myschema” to your db_name , phpmyadmin will print out the commands you need to run… If any of them are trimmed with a “…” click “print view” select all commands and run.
Actually, you do not want to open memcached port in your firewall. #ref: http://serverfault.com/questions/530051/memcached-ports-and-csf
Ways to load an array from file into a variable: 1- $var = require ‘myarray.php’; // or include // myarray.php contents return array(“test”,”test2″); 2 – require ‘myarray.php’; // or include // myarray.php contents $var = array(“test”,”test2″); Use $var as you would normally. 3- $var = file_get_contents(‘myarray.php’); // myarray.php contents array(“test”,”test2″);
When your content area is smallar then your offcanvas menu you’ll get double-rainbowed. To prevent this simply remove either body | html from the following rule in offcanvas.css /* * Style tweaks * ————————————————– */ html, body { overflow-x: hidden; /* Prevent scroll on narrow devices */ } so that it reads: body { overflow-x:…
There are a few issues (things I dont like) about the bootstrap accordion: 1- The title is inline, so you have to click the text part to activate it 2- There is no indication if the item is collapsed or open 3- :hover underlining is obnoxious. To solve all these; simply add the below css:…
There are various ways to get user_ID in WP. But which one is the fastest ? I’ve compared 3 ways function get_uid_from_global() { global $current_user; return $current_user->ID; } function get_uid_by_gcuid() { return get_current_user_id(); } function get_uid_by_wpgcu_id() { return wp_get_current_user()->ID; } Without a doubt, global method was fastest. With multiple 100,000 runs, global method took 0.9~…