You Don't Know JS (book series)
[javascript.ru] (https://learn.javascript.ru/intro)
# Deny access to include files. | |
<Files ~ "\.inc$"> | |
Order Allow,Deny | |
Deny from All | |
</Files> | |
# Deny access to hidden files. | |
RedirectMatch 403 /\..*$ | |
# Deny access to folders. |
jQuery(document).ready(function () { | |
// calendar | |
uikit_jcalendar(); | |
// button | |
uikit_jcalendar_btn('#news_created_btn', 'uk-button-primary', 'calendar'); | |
uikit_jcalendar_btn('#news_publish_up_btn', 'uk-button-secondary', 'future'); | |
}); | |
// calendar |
<?php | |
/** | |
* Sample use: | |
* WordPres Customizer is dependant on functionality in the theme. Just in case | |
* the current theme doesn't support WordPress Customizer we'll use a theme | |
* that supports it. | |
*/ | |
class NN { | |
private $theme_name = 'twentysixteen'; |
{{ path('entity.node.canonical', {'node': node.id }) }} |
You Don't Know JS (book series)
[javascript.ru] (https://learn.javascript.ru/intro)
#!/usr/bin/env sh | |
------------------------------------------ | |
openssl genrsa -out jbzoo-com-ca.key 2048 | |
openssl req -x509 -new -key jbzoo-com-ca.key -days 10000 -out jbzoo-com-ca.crt | |
openssl genrsa -out jbzoo-com-server.key 2048 | |
openssl req -new -key jbzoo-com-server.key -out jbzoo-com-server.csr | |
openssl x509 -req -in jbzoo-com-server.csr -CA jbzoo-com-ca.crt -sha256 -CAkey jbzoo-com-ca.key -CAcreateserial -out jbzoo-com-server.crt -days 5000 |
<?php | |
add_action('admin_init', function () { | |
// Redirect any user trying to access comments page | |
global $pagenow; | |
if ($pagenow === 'edit-comments.php') { | |
wp_redirect(admin_url()); | |
exit; | |
} |
Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
function register_watermarked_size() { | |
add_image_size( 'watermarked', 550, 550, true ); // This is what should be uploaded | |
} | |
add_action( 'init', 'register_watermarked_size' ); | |
class Watermark_Image { | |
// The attachment meta array | |
public $meta = array(); |