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 specific excludes | |
| # | |
| tomcat | |
| # | |
| # Default excludes | |
| # |
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
| #!/bin/bash | |
| #GCC_PATH=/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.05_linux/bin | |
| #GCC_PATH=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin | |
| GCC_PATH=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin | |
| #GCC_PATH=/var/www/arm_sysroot/usr/bin | |
| CROSS=${GCC_PATH}/arm-linux-gnueabihf- | |
| #CROSS=${GCC_PATH}/ | |
| ARM_MA=armv7l-unknown-linux-gnueabihf | |
| #SYS_ROOT=/var/www/arm_sysroot |
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
| // usage: $.redirectPost('/terminals/in_batch_register', {terminal_ids: terminal_ids}); | |
| $(function () { | |
| $.extend({ | |
| redirectPost: function(location, args) { | |
| var form = ''; | |
| $.each(args, function (k, v) { | |
| form += '<input type="hidden" name="' + k +'" value="' + v + '">'; | |
| }); | |
| // rails way | |
| // form += '<%= hidden_field_tag :authenticity_token, form_authenticity_token %>'; |
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
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |
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
| #!/usr/bin/env python | |
| """ | |
| Install a package from your local pip download cache without having to touch | |
| the 'net at all. | |
| You'll need to be using a pip download cache; that is, you'll need the | |
| following in your ~/.pip/pip.cfg: | |
| [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
| 壹 贰 叁 肆 伍 陆 柒 捌 玖 拾 佰 仟 万 亿 元 角 分 零 整 | |
| 例:¥654321 | |
| 人民币陆拾伍万肆仟叁佰贰拾壹元整 |
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
| def cvtToGmt( date: Date ) = { | |
| val tz = TimeZone.getDefault() | |
| var ret = new Date( date.getTime() - tz.getRawOffset() ) | |
| // if we are now in DST, back off by the delta. Note that we are checking the GMT date, this is the KEY. | |
| if ( tz.inDaylightTime( ret )) { | |
| val dstDate = new Date( ret.getTime() - tz.getDSTSavings() ) | |
| // check to make sure we have not crossed back into standard time | |
| // this happens when we are on the cusp of DST (7pm the day before the change for PDT) |
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
| # example: mergepath $JAVA_HOME/bin java | |
| mergepath() { | |
| if [[ "${PATH/$1/}" != "$PATH" ]] ; then | |
| echo $2 already in \$PATH | |
| else | |
| export PATH=$1:$PATH | |
| echo add $2 to \$PATH | |
| fi | |
| } |
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
| log4j.rootLogger=INFO, console, rfile, logfile, errfile | |
| log4j.appender.console=org.apache.log4j.ConsoleAppender | |
| log4j.appender.console.layout=org.apache.log4j.PatternLayout | |
| log4j.appender.console.layout.ConversionPattern=%5p | %m%n | |
| log4j.appender.console.threshold=INFO | |
| log4j.appender.rfile=org.apache.log4j.RollingFileAppender | |
| log4j.appender.rfile.file=${app.base}/log/app.log | |
| log4j.appender.rfile.maxFileSize=1024KB | |
| log4j.appender.rfile.maxBackupIndex=5 |