Disable drupal 7 css and js compression for some roles

If we need to disable drupal js or css compression for some roles we can use code below. Moreover we can change here ary settings from global $conf variable. For example you can change cache life time for certain roles or block caching. Any setting from this page http://yoursite.com/admin/config/development/performance can be changed in code given below. 

Thank you for reading! Continue doing drupal!

 * Implements hook_init().
function mysite_init() {
  // Disable css agregation for some roles.
  global $user;
  if ($user->uid != 0) {
    $roles = array_values($user->roles);
    foreach ($roles as $role) {
      if (in_array($role, array('administrator', 'editor', 'producer'))) {
        global $conf;
        // Block cache settings
        $conf['block_cache'] = FALSE;
        // Minimum cache lifetime 5 minutes.
        $conf['cache_lifetime'] = 300;
        // Compress cached pages 5 minutes.
        $conf['cache_maximum_age'] = 300;
        // Expiration of cached pages.
        $conf['page_compression'] = FALSE;
        // Aggregate and compress css.
        $conf['preprocess_css'] = FALSE;
        // Aggregate js.
        $conf['preprocess_js'] = FALSE;