Other OSX的ports bulk install命令

#!/bin/bash

IFS="
"
list="
coreutils@+with_default_names
findutils@+with_default_names
getopt
openssh
sqlite3
apache2
mysql5@+server
postgresql82
postgresql82-server
php5@+macosx+apache2+mysql5+postgresql+readline+pear+pcntl+sqlite+fastcgi
rsync
keychain
subversion
cvs
lv
wget
lha
optipng
advancecomp
aspell
aspell-dict-en
dict
zip
gnupg
ruby
gnutls
lighttpd
fetchmail
maildrop
synergy
"

for i in $list ;do
    port install ${i}
done

# /opt/local/apache2/bin/apxs -a -e -n "php5" /opt/local/apache2/modules/libphp5.so

Other 加载jquery.js

<script src="http://www.do-planning.jp/jsLib/jquery.js" type="text/javascript" charset="utf-8"></script>

Other 加载jquery.scrollTo.js和jquery.localscroll.jp

<script src="http://www.do-planning.jp/jsLib/jquery.scrollTo-min.js" type="text/javascript" charset="utf-8"></script>
<script src="http://www.do-planning.jp/jsLib/jquery.localscroll-min.js" type="text/javascript" charset="utf-8"></script>

Other AS3ãƒãƒ¼ã,«ãƒ«ãƒ•ã,¡,ãƒ,å...§...§ãƒœã,¿ã³³

package {
    import flash.display.*;
    import flash.events.*;
    import flash.net.FileReference;
    import flash.text.*;
    public class FileSelect extends Sprite {
        private var tf:TextField = new TextField();
        private var fileReference:FileReference = new FileReference();
        public function FileSelect( ) {
            addChild(tf);
            tf.autoSize = TextFieldAutoSize.LEFT;
            tf.text="press button";

            // ボタンの作成
            var button:SimpleButton = new SimpleButton( );
            button.x = 20;
            button.y = 40;
            
            button.upState = createCircle( 0x00FF00, 15 );
            button.overState = createCircle( 0xFFFFFF, 16 );
            button.downState = createCircle( 0xCCCCCC, 15 );
            button.hitTestState = button.upState;
            
            // マウスクリックイベントのリスナ登録
            button.addEventListener( MouseEvent.CLICK, handleClick );
            addChild( button );

        }
        private function createCircle( color:uint, radius:Number ):Shape {
            var circle:Shape = new Shape( );
            circle.graphics.lineStyle( 1, 0x000000 );
            circle.graphics.beginFill( color );
            circle.graphics.drawCircle( 0, 0, radius );
            circle.graphics.endFill( );
            return circle;
        }
        private function handleClick( event:MouseEvent ):void {
            // ファイル選択イベントのリスナ登録
            fileReference.addEventListener(Event.SELECT, onSelectFile);
            fileReference.browse();
        }
        private function onSelectFile( event:Event ):void {
            // 選択されたファイル名の表示
            tf.text = fileReference.name;
        }
    }
}

Other 简单的日子以来

<?php
function days_since ($time) {
	$startdate   = strtotime($time);
	$presentdate = time();
	$days = round(($presentdate - $startdate)/86400);
	return $days;
}
?>

Other coolhCard

<div class="vcard">
   ${1:<img style="float:left; margin-right:4px" src="${2:http://photo.url.com/}" alt="photo" class="photo"/>}
   <a class="url fn n" href="http://${3:yoursite.com}">
       <span class="given-name">${4:given-name}</span>
       ${5:<span class="additional-name">${6:additional-name}</span>
       }<span class="family-name">${7:family-name}</span>
   </a>
   ${8:<div class="org">${9:organization}</div>
   }<a class="email" href="mailto:$10">${10:email}</a>
   ${11:<div class="adr">
       <div class="street-address">${12:street}</div>
       <span class="locality">${13:city}</span>,
       <span class="region">${14:state_province}</span>,
       <span class="postal-code">${15:postal_code}</span>
       <span class="country-name">${16:country_name}</span>
   </div>
   }${17:<div class="tel">${18:phone}</div>
   }${19:<a class="url" href="aim:goim?screenname=$20">${20:AIM}</a>
   }${21:<a class="url" href="ymsgr:sendIM?$22">${22:YIM}</a>}
</div>

Other Flickr图片网址

"http://farm#{att['farm']}.static.flickr.com/#{att['server']}/#{att['id']}_#{att['secret']}.jpg"

Other 自动清除元素

/* FOR TEXTMATE (and E Editor?) ONLY */
/* auto clear for modern browsers */
${1:element}:after{ 
  content: "."; 
  display: block; 
  height: 0; 
  font-size:0; 
  clear: both; 
  visibility:hidden; 
}

/* auto clear for the browser that could... 
   this needs the css_browser_select js script :
   http://rafael.adm.br/css_browser_selector/css_browser_selector.js.txt */
.ie ${1:element}{
  height: 1%;
  display:block;
}

Other PureMVC StageMediator类模板

/**
 * Base PureMVC Project
 */
package view
{
    import flash.display.Stage;
    import flash.events.MouseEvent;
    import org.puremvc.as3.interfaces.*;
    import org.puremvc.as3.patterns.mediator.Mediator;
    
	import ApplicationFacade;

    /**
     * A Mediator for interacting with the Stage.
     */
    public class StageMediator extends Mediator implements IMediator
    {
        // Cannonical name of the Mediator
        public static const NAME:String = "StageMediator";

        public function StageMediator( viewComponent:Object ) 
        {
            /**
             * pass the viewComponent to the superclass where 
             * it will be stored in the inherited viewComponent property
             */
            super( NAME, viewComponent );
        }

		/**
		 * StageMediator lists the INITIALIZE_SITE notification as an 
		 * event of interest. You may list as many notification 
		 * interests as needed.
		 */
        override public function listNotificationInterests():Array 
        {
            return [ 
            		ApplicationFacade.INITIALIZE_SITE
                   ];
        }

        /**
         * Called by the framework when a notification is sent that
         * this mediator expressed an interest in.
         */
        override public function handleNotification( note:INotification ):void 
        {
            switch ( note.getName() ) 
            {
            	/**
            	 * If the notification sent has a name matching 
            	 * ApplicationFacade.INITIALIZE_SITE then this code block will execute
            	 */
                case ApplicationFacade.INITIALIZE_SITE:     	
					initializeSite();
                  	break;
            }
        }
        
        /**
        * Called to handle the INITIALIZE_SITE notification.
        * Creates SiteMediator, NavMediator, BodyMediator to provide
        * PureMVC functionality to the varies view components of the application.
        */
        private function initializeSite():void
        {
			
        }

		/**
		 * Retrieves the viewComponent and casting it to type Stage
		 */
        protected function get stage():Stage
        {
            return viewComponent as Stage;
        }
    }
}

Other PureMVC StartupCommand类模板

/**
 * Base PureMVC Project
 */
package controller
{
    import flash.display.Stage;
    import org.puremvc.as3.interfaces.ICommand;
    import org.puremvc.as3.interfaces.INotification;
    import org.puremvc.as3.patterns.command.SimpleCommand;
    
    import ApplicationFacade;
    import view.StageMediator;


	/**
	 * Simple StartupCommand for PureMVC Structured Project
	 */
    public class StartupCommand extends SimpleCommand implements ICommand
    {
        override public function execute( note:INotification ) : void    
        {
        	/**
			 * Get the View Components for the Mediators from the app,
         	 * which passed a reference to itself on the notification.
         	 */
	    	var stage:Stage = note.getBody() as Stage;
	
            facade.registerMediator( new StageMediator( stage ) );
        }
    }
}