Getting started:
Related tutorials:
- MySQL-CLI: https://www.youtube.com/playlist?list=PLfdtiltiRHWEw4-kRrh1ZZy_3OcQxTn7P
- Analyzing Business Metrics: https://www.codecademy.com/learn/sql-analyzing-business-metrics
<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
Getting started:
Related tutorials:
//scroll back to the top of screen button | |
if ($('#back-to-top').length) { | |
var scrollTrigger = 100, // px | |
backToTop = function () { | |
var scrollTop = $(window).scrollTop(); | |
if (scrollTop > scrollTrigger) { | |
$('#back-to-top').addClass('show'); | |
} else { | |
$('#back-to-top').removeClass('show'); | |
} |
$featured_image_url = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ); | |
if ( ! empty( $featured_image_url ) ) { |
find . -type f | sed 's/^.*\/\([^/]*\)$/\1/' | sort | uniq -c | grep -v '^ 1' | |
IFS=$'\n'; for f in `find . -type f | sed 's/^.*\/\([^/]*\)$/\1/' | sort | uniq -c | grep -v '^ 1'`; do echo $f; t=`echo "$f" | awk '{print $2}'`; find . -name $t; echo $'\n'; done | |
IFS=$'\n' | |
dupes=`find . -type f | | |
sed 's/^.*\/\([^/]*\)$/\1/' | | |
sort | |
(((ftp|https?):\/\/)(www\.)?|www\.)([\da-z-_\.]+)([a-z\.]{2,7})([\/\w\.-_\?\&]*)*\/? |
grep -rnw '/path/to/somewhere/' -e 'pattern' |
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) | |
VALUES ('newadmin', MD5('pass123'), 'firstname lastname', 'email@example.com', '0'); | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10'); |
error_log( print_r($multidimensionalarray, TRUE) ); |