メールの振り分けをしてくれるソフトウェア。
設定ファイルにルールを記載するとよきに計らってくれる。
yum install procmail
# procmailのパス調べる
which procmail
| function my_remove_wp_seo_meta_box() { | |
| remove_meta_box('wpseo_meta', YOUR_POST_TYPE_NAME_HERE, 'normal'); | |
| } | |
| add_action('add_meta_boxes', 'my_remove_wp_seo_meta_box', 100); |
| #!/bin/bash | |
| # This one-liner script plays a video in an infinite loop on a raspberry pi | |
| # for a video-art exhibition. | |
| # It was written for a video in portrait orientation so the video is rotated 270 | |
| # to use up the whole screen (which was also rotated). | |
| # Charles Martin, July 2016 | |
| omxplayer -o local --loop /home/pi/video.mp4 --orientation 270 |
| // 使用 userAgent 判断是否微信内置浏览器 | |
| if( navigator.userAgent.toLowerCase().indexOf('micromessenger') > -1 || typeof navgator.wxuserAgent !== "undefined" ) { | |
| return true; | |
| } |
| #!/bin/bash | |
| mkdir wordpress-site && cd wordpress-site | |
| touch docker-compose.yml | |
| cat > docker-compose.yml <<EOL | |
| version: "2" | |
| services: | |
| my-wpdb: |
| #!/bin/bash | |
| cd wordpress-site | |
| cat >> docker-compose.yml <<EOL | |
| my-wpcli: | |
| image: tatemz/wp-cli | |
| volumes_from: | |
| - my-wp | |
| links: |
| <?php //* Mind this opening PHP tag | |
| // Remove the logout link in comment form | |
| add_filter( 'comment_form_logged_in', '__return_empty_string' ); |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
| // Create a new object for custom validation of a custom field. | |
| var nameSpaceController = Marionette.Object.extend( { | |
| initialize: function() { | |
| this.listenTo( nfRadio.channel( 'form' ), 'render:view', this.doCustomStuff ); | |
| }, | |
| doCustomStuff: function( view ) { | |
| var formModel = view.model; // formModel will be a Backbone model with all of our form data. | |
| var formID = formModel.get( 'id' ); // We can use .get( 'setting' ) get get any of our form settings. |
| function sanitize_chinese_user( $username, $raw_username, $strict ) { | |
| if ( $username != $raw_username ) { | |
| $username = $raw_username; | |
| } | |
| $username = strip_tags( $username ); | |
| // Kill Chinese characters | |
| $username = preg_replace( '|[^a-z0-9 _.\-@一-龥]|ui', '', $username ); | |
| // Consolidate contiguous whitespace |