(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?php | |
/* | |
replacing the default "Enter title here" placeholder text in the title input box | |
with something more descriptive can be helpful for custom post types | |
place this code in your theme's functions.php or relevant file | |
source: http://flashingcursor.com/wordpress/change-the-enter-title-here-text-in-wordpress-963 | |
*/ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
type StringLiteralDiff<T extends string, U extends string> = ({[P in T]: P } & {[P in U]: never } & { [x: string]: never })[T]; | |
type Omit<T, K extends keyof T> = Pick<T, StringLiteralDiff<keyof T, K>>; | |
interface ComponentProps { | |
propA: string | |
propB: number | |
propC: () => void | |
} |
function getGreetingTime (m) { | |
var g = null; //return g | |
if(!m || !m.isValid()) { return; } //if we can't find a valid or filled moment, we return. | |
var split_afternoon = 12 //24hr time to split the afternoon | |
var split_evening = 17 //24hr time to split the evening | |
var currentHour = parseFloat(m.format("HH")); | |
if(currentHour >= split_afternoon && currentHour <= split_evening) { |
<?php | |
/* This sets the $time variable to the current hour in the 24 hour clock format */ | |
$time = date("H"); | |
/* Set the $timezone variable to become the current timezone */ | |
$timezone = date("e"); | |
/* If the time is less than 1200 hours, show good morning */ | |
if ($time < "12") { | |
echo "Good morning"; | |
} else | |
/* If the time is grater than or equal to 1200 hours, but less than 1700 hours, so good afternoon */ |
#!/bin/sh | |
find . -maxdepth 1 -mindepth 1 -type d -exec sh -c '(echo {} && cd {} && git status -s && echo)' \; |
find . -type d \( -path ./node_modules -o -path ./vendor -o -path ./bower_components \) -prune -o -print
add_filter('upload_dir', 'cdn_upload_url');
function cdn_upload_url($args)
{
$args['baseurl'] = 'https://your.awesomecdn.net/wp-content/uploads'; //Change to your base CDN directory - no trailing slash
return $args;
}