Sign up to create your own snipts, or login.

Public snipts » format The latest public format snipts.

showing 1-8 of 8 snipts for format
  • Format disk using FAT 16
    sudo mkdosfs -F 16 /path/to/disk/unit
    

    copy | embed

    0 comments - tagged in  posted by marianosimone on Jul 01, 2010 at 3:50 p.m. EDT
  • ntfs partition format in linux console
    #format a ntfs partition in linux console
    
    mkntfs /dev/sdxx
    

    copy | embed

    0 comments - tagged in  posted by sayajin on May 26, 2010 at 6:57 a.m. EDT
  • Format phone numbers in spreadsheet
    ="("&MID(A2,1,3)&") "&MID(A2,4,3)&"-"&MID(A2,7,4)
    

    copy | embed

    0 comments - tagged in  posted by terramar on Mar 12, 2010 at 4:59 p.m. EST
  • download an XML format description from PRONOM registry
    <form action="http://www.nationalarchives.gov.uk/PRONOM/Format/proFormatDetailListAction.aspx" id="frmSaveAs" name="SaveAs" method="post">
        <input type="hidden" id="hidSaveFormAction" name="strAction" value="Save As XML" />
        <input type='visible' name='strFileFormatID' value='788' />
    </form>
    
    <a href="#" class="plainblackb" onclick="document.getElementById('frmSaveAs').strAction.value = 'Save As XML'; document.getElementById('frmSaveAs').submit();">XML</a> 
    
    <?
    $headers = apache_request_headers();
    
    foreach ($headers as $header => $value) {
    echo "$header: $value <br />\n";
    } 
    echo "------------------------<br/>";
    
    $domain = "localhost";
    $portno = 80;
    $method = "HEAD";
    $url    = "/";
    
    $http_response = "";
    $http_request .= $method." ".$url ." HTTP/1.0\r\n";
    $http_request .= "\r\n";
    
    $fp = fsockopen($domain, $portno, $errno, $errstr);
    if($fp){
        fputs($fp, $http_request);
        while (!feof($fp)) $http_response .= fgets($fp, 128);
        fclose($fp);
    }
    
    echo "http:".$http_response; 
    ?>
    

    copy | embed

    0 comments - tagged in  posted by matt_dunckley on Oct 01, 2009 at 11:41 a.m. EDT
  • Format
    /*
    Theme Name: Rose
    Theme URI: the-theme's-homepage
    Description: a-brief-description
    Author: your-name
    Author URI: your-URI
    Template: use-this-to-define-a-parent-theme--optional
    Version: a-number--optional
    .
    General comments/License Statement if any.
    .
    
    
    [Table Of Contents] 
    
    	0- Reset
    	1- Global
    	2- Links
    	3- Headings
    	4- Header 
    	5- Navigation
    	6- Middle 
    	7- Forms
    	8- Extras
    	9- Footer 
    
    */
    
    /* =0 Reset
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    @import url('reset.css');
    /* =1 Global
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    body {
    	line-height: 1;
    	font: normal 12px Arial, Helvetica, sans-serif;
    	vertical-align: top;
    	background: #fff;
    	color: #000;
    }
    .right {
    	float: right;
    }
    .left {
    	float: left;
    }
    .align-left {
    	text-align: left;
    }
    .align-right {
    	text-align: right;
    }
    .align-center {
    	text-align:center;
    }
    .justify {
    	text-align:justify;
    }
    .hide {
    	display: none;
    }
    .clear {
    	clear: both;
    }
    .bold {
    	font-weight:bold;
    }
    .italic {
    	font-style:italic;
    }
    .underline {
    	border-bottom:1px solid;
    }
    .highlight {
    	background:#ffc;
    }
    img.centered {
    	display: block;
    	margin-left: auto;
    	margin-right: auto;
    }
    img.alignleft {
    	float:left;
    	margin:4px 10px 4px 0;
    }
    img.alignright {
    	float:right;
    	margin:4px 0 4px 10px;
    }
    
    
    .clearfix:after {
    	content: ".";
    	display: block;
    	clear: both;
    	visibility: hidden;
    	line-height: 0;
    	height: 0;
    }
    .clearfix {
    	display: block;
    }
    html[xmlns] .clearfix {
    	display: block;
    }
    * html .clearfix {
    	height: 1%;
    }
    /* =2 Links
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    a:link, a:visited {
    	color: #333;
    }
    a:hover {
    	color: #111;
    }
    a:active {
    	color: #111;
    }
    /* =3 Headings
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    h1 {
    	font: bold 2em "Times New Roman", Times, serif;
    }
    h2 {
    	font: bold 1.5em "Times New Roman", Times, serif;
    }
    h3 {
    	font: bold 1.2em Arial, Geneva, Helvetica, sans-serif;
    }
    h4 {
    	font: bold 1em Arial, Geneva, Helvetica, sans-serif;
    }
    h5 {
    	font: bold 0.9em Arial, Geneva, Helvetica, sans-serif;
    }
    /* =4 Header
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    /* =5 Navigation
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    /* =6 Middle
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    /* =7 Form
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    /* =8 Extra
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    /* =9 Footer
    –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
    

    copy | embed

    0 comments - tagged in  posted by paz on Sep 07, 2009 at 12:24 a.m. EDT
  • Generate formatted phone number for use in spreadsheets (e.g. 1111111111 to (111) 111-1111)
    ="("&LEFT(L3,3)&") "&MID(L3,4,3)&"-"&RIGHT(L3,4)
    

    copy | embed

    0 comments - tagged in  posted by terramar on Jun 28, 2009 at 4:27 a.m. EDT
  • How to format dates in drupal
    <?php
    
    print format_date(strtotime($node->field_event_date[0]['value']), 'custom', 'D, j M, Y \a\\t G:i' );
    
    ?>
    

    copy | embed

    0 comments - tagged in  posted by pshafer on Apr 14, 2009 at 3:17 p.m. EDT
  • fill number with 0s to desired length
    // $n - desired length of string
    str_pad($number,$n,"0",STR_PAD_LEFT);
    

    copy | embed

    0 comments - tagged in  posted by dxvxd on Jan 29, 2009 at 8:00 a.m. EST
Sign up to create your own snipts, or login.