git archive
git archive master | tar -x -C /somewhere/else
If you want a compressed archive .
git archive master | bzip2 >source-tree.tar.bz2
ZIP archive
git archive --format zip --output /full/path/to/zipfile.zip master
sudo a2enmod rewritefunction isNumber(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
phpunit --coverage-html ./report --filter InsuranceStatusEligibilityFilterTest PluginAllTests.php
svn gedit svn:externals ./Gedit is the editor that you will see the external repository information, do the nessasary change and save to change the edit external svn repositories
if($('#cbxEmployeeFamily_'+planId).is(':checked')){
$('#cbxEmployeeFamily_'+planId).attr('checked', true);
}
public function getDatesForYear($monthlyFequency,$date){
$dateParts = explode("-",$date);
$firstDayOfTheYear = $dateParts[0] . '-01-01';
$lastDayOfTheYear = $dateParts[0] . '-12-31';
$i = $firstDayOfTheYear;
for(strtotime($i);strtotime($i)<=strtotime($lastDayOfTheYear);) {
$accruDate[] = date('Y-m-d',strtotime($i . " +$monthlyFequency months -1 day ")) ;
$i = date('Y-m-d',strtotime($i . " +$monthlyFequency months"));
} return $accruDate;
}
foreach($form->getWidgetSchema()->getPositions() as $widgetName)
{
echo $form[$widgetName]->renderError();
}
$this->form->getErrorSchema();
sudo apt-get install apache2
sudo gedit /etc/apache2/conf.d/fqdn
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
function makeCsv($headerArray,$bodyArray) {
$headerIncluded = false;
$fp = fopen('php://temp/maxmemory:' . (5 * 1024 * 1024), 'r+'); // 5MB of memory allocated
$content = $bodyArray;
foreach ($content as $row) {
if(!$headerIncluded) {
$headerIncluded = true;
fputcsv($fp, $headerArray); // create the csv file in the memory
}
fputcsv($fp, $row);
}
rewind($fp);
$output = stream_get_contents($fp); // get csv file from the memory
fclose($fp);
return $output;
}
sudo apt-get install nautilus-open-terminal
YEAR(CURRENT_DATE)-YEAR('1971-01-01') as years_now
date("Y-m-d", strtotime(date('Y-m-d') . " +6 month"));
form#frmBilling label:not(.formRadio){
width: 140px;
}
>svn diff -r 6738:6739>mychange.diff
>patch -p0 -i mychange.diff
>svn diff -r REVNO:HEAD --summarize
>svn diff -r 6738:6739 --summarize
>svn diff -r 6738:6739>mychange.diff
>patch -p0 -i mychange.diff
mysql -u UserName -p password databaseName > dbdump.sql
mysql -u UserName -p password databaseName < dbdump.sql
sudo apache2ctl -l
sudo gedit /etc/apache2/sites-available/default
Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # Uncomment this directive is you want to see apache2's # default start page (in /apache2-default) when you go to / #RedirectMatch ^/$ /apache2-default/
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
svn revert --recursive .
function isValidDate(txtDate) {
var objDate; // date object initialized from the txtDate string
var mSeconds; // milliseconds from txtDate
// date length should be 10 characters - no more, no less
if (txtDate.length != 10) return false;
// extract day, month and year from the txtDate string
// expected format is YYYY-mm-DD
// subtraction will cast variables to integer implicitly
var day = txtDate.substring(8,10) - 0;
var month = txtDate.substring(5,7) - 1; // because months in JS start with 0
var year = txtDate.substring(0,4) - 0;
// third and sixth character should be /
if (txtDate.substring(2,3) != '-') return false;
if (txtDate.substring(5,6) != '-') return false;
// test year range
if (year < 999 || year > 3000) return false;
// convert txtDate to the milliseconds
mSeconds = (new Date(year, month, day)).getTime();
// set the date object from milliseconds
objDate = new Date();
objDate.setTime(mSeconds);
// if there exists difference then date isn't valid
if (objDate.getFullYear() != year) return false;
if (objDate.getMonth() != month) return false;
if (objDate.getDate() != day) return false;
// otherwise return true
return true;
}