Skip to main content

Posts

Showing posts from September, 2011

Wordpress Tutorial: Custom Admin Panel with image upload

In previous tutorial we developed a basic plugin that allowed us to use a shortcode. This tutorial will show you how to make basic administration panel in WordPress admin. We will make two fields, first will hold name of the image and the second will hold the image itself. Image adding will be done via WordPress native image upload interface. function wp_myCustomPlugin_install ( ) {       $newoptions = get_option ( 'mycustomplugin_options' ) ;       $newoptions [ 'title' ] = '' ;       $newoptions [ 'image' ] = '' ; } http://premiumcoding.com/wordpress-tutorial-custom-admin-panel/

OpenVZ VSwap

New  RHEL6-based OpenVZ  kernel has a new memory management model, which supersedes  User beancounters . It is called  VSwap . Now you can set two primary parameters:  physpages  and  swappages , while all the other beancounters become secondary. physpages This parameter limits the physical memory (RAM) available to processes inside a container. The  barrier  is ignored, and the  limit  sets the limit. Currently the user memory and the page cache are accounted into  physpages . swappages This parameter limits the amount of swap space which can be used for processes inside a container. The  barrier  is ignored, and the  limit  sets the limit. The sum of physpages.limit and swappages.limit limits the maximum amount of allocated memory which can be used by a container. When physpages limit is reached, memory pages belonging to the container are pushed out to so called virtual swap ( vswap ). The difference between normal swap and vswap is that with vswap no actual disk I/O u