This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input id="query" type="text" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function suggest(element) { | |
| var query = element.val(); | |
| $.ajax({ | |
| url: "api/suggest.php", | |
| dataType: "json", | |
| data: "q=" + query, | |
| success: function(data) { | |
| element.val(data.suggestion); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $q = $_REQUEST['q']; | |
| $commands = array('create', 'delete', 'insert', 'help', 'select'); | |
| $response = array(); | |
| $length = strlen($q); | |
| while(list($key, $proposal) = each($commands)) { | |
| if (strtolower($q) == strtolower(substr($proposal, 0, $length))) { | |
| $response['suggestion'] = $proposal; | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mkdir -p /usr/local/{share/man,bin,lib/node,include/node} | |
| sudo chown -R $USER /usr/local/{share/man,bin,lib/node,include/node} | |
| mkdir node-install | |
| curl http://nodejs.org/dist/node-v0.4.7.tar.gz | tar -xzf - -C node-install | |
| cd node-install/* | |
| ./configure | |
| make install | |
| curl http://npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm install uglify-js | |
| sudo ln -s /home/$USER/node-install/node-v0.4.7/node_modules/uglify-js/bin/uglifyjs /usr/bin/uglifyjs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /path/to/terrific/build | |
| ant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget http://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz | |
| tar xvfz Cheetah-2.4.4.tar.gz | |
| cd Cheetah-2.4.4 | |
| sudo python setup.py install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install python ant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <project name="Your Project Name" default="dist" basedir="."> | |
| <property file="build-private.properties" /> | |
| <property file="build.properties" /> | |
| <property name="dist" location="dist" /> | |
| <target name="dist" description="generate the distribution"> | |
| <mkdir dir="${dist}" /> | |
| <delete file="${dist}/${product}-${version}.tar.gz" /> | |
| <tar destfile="${dist}/${product}-${version}.tar.gz" compression="gzip"> | |
| <tarfileset dir="${basedir}"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PRODUCT="myproject" | |
| VERSION="1.0.0" | |
| FILE="/your/path/to/software/releases/$PRODUCT-$VERSION.tar.gz" | |
| rm -R /opt/app/$PRODUCT-$VERSION | |
| mkdir /opt/app/$PRODUCT-$VERSION | |
| cd /opt/app/$PRODUCT-$VERSION | |
| tar xvf $FILE |
OlderNewer