IMPORTANT!

Snipt is going open source. We've toyed with this idea for quite a while, and have finally decided it's the right way to move forward.

A few things:
  • The entire Snipt source code will be released on GitHub under the 3-clause BSD License on Friday, September 10th.
  • While we'd like to think we're perfect, we realize we're only human. By open sourcing the software that runs this website, certain bugs or security flaws may be discovered that could compromise the privacy of your snipts.
  • Only the Lion Burger team will be able to push commits to the Snipt.net site. Contributors should send a pull request to add new features or submit patches.
  • By using this site, you agree not to be too angry or take any legal action against Lion Burger should this whole thing go up in flames some day.
  • Follow us on Twitter for updates.
I agree, close this message
Sign up to create your own snipts, or login.

Latest 100 public snipts » sirkitree's snipts The latest snipts from sirkitree.

showing 1-3 of 3 snipts
  • vbo-pr0n
      $view = new view;
      $view->name = 'admin_user';
      $view->description = '';
      $view->tag = '';
      $view->view_php = '';
      $view->base_table = 'users';
      $view->is_cacheable = FALSE;
      $view->api_version = 2;
      $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
      $handler = $view->new_display('default', 'Defaults', 'default');
      $handler->override_option('fields', array(
        'name' => array(
          'label' => 'Name',
          'alter' => array(
            'alter_text' => 0,
            'text' => '',
            'make_link' => 0,
            'path' => '',
            'alt' => '',
            'prefix' => '',
            'suffix' => '',
            'help' => '',
            'trim' => 0,
            'max_length' => '',
            'word_boundary' => 1,
            'ellipsis' => 1,
            'html' => 0,
          ),
          'link_to_user' => 1,
          'overwrite_anonymous' => 0,
          'anonymous_text' => '',
          'exclude' => 0,
          'id' => 'name',
          'table' => 'users',
          'field' => 'name',
          'relationship' => 'none',
        ),
        'mail' => array(
          'label' => 'E-mail',
          'alter' => array(
            'alter_text' => 0,
            'text' => '',
            'make_link' => 0,
            'path' => '',
            'alt' => '',
            'prefix' => '',
            'suffix' => '',
            'help' => '',
            'trim' => 0,
            'max_length' => '',
            'word_boundary' => 1,
            'ellipsis' => 1,
            'html' => 0,
          ),
          'link_to_user' => 'mailto',
          'exclude' => 0,
          'id' => 'mail',
          'table' => 'users',
          'field' => 'mail',
          'relationship' => 'none',
        ),
      ));
      $handler->override_option('filters', array(
        'status' => array(
          'operator' => '=',
          'value' => FALSE,
          'group' => '0',
          'exposed' => TRUE,
          'expose' => array(
            'operator' => '',
            'identifier' => 'status',
            'label' => 'Active',
            'optional' => 1,
            'remember' => 1,
          ),
          'id' => 'status',
          'table' => 'users',
          'field' => 'status',
          'relationship' => 'none',
        ),
      ));
      $handler->override_option('access', array(
        'type' => 'none',
      ));
      $handler->override_option('items_per_page', 0);
      $handler->override_option('style_plugin', 'bulk');
      $handler->override_option('style_options', array(
        'grouping' => '',
        'override' => 1,
        'sticky' => 0,
        'order' => 'asc',
        'columns' => array(
          'name' => 'name',
          'mail' => 'mail',
          'firstname' => 'firstname',
          'lastname' => 'lastname',
          'dob' => 'dob',
          'gender' => 'gender',
          'about' => 'about',
          'status_text' => 'status_text',
          'websites' => 'websites',
          'numberofvisits' => 'numberofvisits',
        ),
        'info' => array(
          'name' => array(
            'sortable' => 0,
            'separator' => '',
          ),
          'mail' => array(
            'sortable' => 0,
            'separator' => '',
          ),
          'firstname' => array(
            'separator' => '',
          ),
          'lastname' => array(
            'separator' => '',
          ),
          'dob' => array(
            'separator' => '',
          ),
          'gender' => array(
            'separator' => '',
          ),
          'about' => array(
            'separator' => '',
          ),
          'status_text' => array(
            'separator' => '',
          ),
          'websites' => array(
            'separator' => '',
          ),
          'numberofvisits' => array(
            'separator' => '',
          ),
        ),
        'default' => '-1',
        'execution_type' => '1',
        'display_type' => '0',
        'skip_confirmation' => 0,
        'display_result' => 1,
        'merge_single_action' => 1,
        'selected_operations' => array(
          '233501f75517b931e075e953edb7a58d' => '233501f75517b931e075e953edb7a58d',
          '4bd509ad947296ffe30e8092a438e096' => 0,
          '4d075a755ad70f936bf89570e66196f1' => 0,
          '132fddcb3f367a243bee632db31985c1' => 0,
          'daa75f478e3093ab107e657da6620a91' => 0,
          '52aec7fee2070ce530da1304653ae1ec' => 0,
          '4fff50383fdc48042390841723c0d719' => 0,
          'dfdea479cc7ae8cb9d3e8749e57f86b4' => 0,
          'a011c04389ff75f79af39bb612089bca' => 0,
          '334d20af1ae7ac4b770b7ec3210b2638' => 0,
        ),
      ));
      $handler = $view->new_display('page', 'Page', 'page_1');
      $handler->override_option('path', 'admin/user/user/export');
      $handler->override_option('menu', array(
        'type' => 'none',
        'title' => '',
        'description' => '',
        'weight' => 0,
        'name' => 'navigation',
      ));
      $handler->override_option('tab_options', array(
        'type' => 'none',
        'title' => '',
        'description' => '',
        'weight' => 0,
      ));
    

    copy | embed

    0 comments - tagged in  posted by sirkitree on Apr 09, 2009 at 6:25 p.m. EDT
  • git tips and tricks
    GIT
    ## Tips & Tricks ##
    
    - Important tip with remotes: http://git.or.cz/gitwiki/GitFaq#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73
    
    - Show GIT branch in terminal (usability): http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
    
    - Printable cheat sheet: http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html
    
    - "It's common practice (although I don't recommend it) to have multiple projects in a single Subversion repository. You definitely shouldn't do this with Git. Each project should have its own Git repository within the /usr/local/gitroot directory." - http://notahat.com/posts/25
    
    - When you branch, you should rebase instead of "pull". This avoids creating a merge commit and more cleanly identifies the history of your work. More details: http://book.git-scm.com/4_rebasing.html
    
    
    
    ## Tools ##
    Giggle (GTK) http://live.gnome.org/giggle
    GitX (Mac) http://gitx.frim.nl/
    
    
    
    ## Resources ##
    
    Quick learn: http://gitready.com/
    Guides from the source: http://github.com/guides/ 
    Working with UnFuddle: http://unfuddle.com/docs/git
    The book: http://book.git-scm.com/index.html
    SVN <> GIT equivalent commands: http://git.or.cz/course/svn.html
    Videos (pay): https://peepcode.com/
    

    copy | embed

    1 comment - tagged in  posted by sirkitree on Feb 24, 2009 at 7:38 p.m. EST
  • cancel links within popups
      
      drupal_add_js("
        Drupal.behaviors.popupsCancel = function() {
          $('a:contains(". t('Cancel') .")').click(function() {
            Drupal.popups.close(); 
            return false;
          });
        };
      ", 'inline');
    

    copy | embed

    0 comments - tagged in  posted by sirkitree on Dec 15, 2008 at 5:44 p.m. EST
Sign up to create your own snipts, or login.