##Date and Time
=TIMEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " ")) + DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))
##Date
=DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))
##Time
| namespace :db do desc "Backup project database. Options: DIR=backups RAILS_ENV=production MAX=7" | |
| task :backup => [:environment] do | |
| datestamp = Time.now.strftime("%Y-%m-%d_%H-%M-%S") | |
| base_path = Rails.root | |
| base_path = File.join(base_path, ENV["DIR"] || "backups") | |
| backup_base = File.join(base_path, 'db_backups') | |
| backup_folder = File.join(backup_base, datestamp) | |
| backup_file = File.join(backup_folder, "#{RAILS_ENV}_dump.sql") | |
| FileUtils.mkdir_p(backup_folder) | |
| db_config = ActiveRecord::Base.configurations[RAILS_ENV] |
| namespace :project do desc "Backup before migration and migrate" | |
| task :update => [:environment] do | |
| Rake::Task["db:backup"].invoke | |
| Rake::Task["db:migrate"].invoke | |
| end | |
| end |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use POSIX; | |
| use Getopt::Std; | |
| getopt('h'); | |
| ################################################################## | |
| # Monitoring JMX by Radek Antoniuk <[email protected]> # | |
| ################################################################## |
| 139d138 | |
| < $self->{_token} = undef; | |
| 353,363c352,355 | |
| < | |
| < my $scanList = $xmls->{'contents'}->[0]->{'scans'}->[0]->{'scanList'}; | |
| < | |
| < if(ref($scanList->[0])) { | |
| < | |
| < if(exists($scanList->[0]->{'scan'})) { | |
| < foreach my $scan (@{$scanList->[0]->{'scan'}}) { |
| $TODAY=(Get-Date).ToString('yyyy-MM-dd') | |
| $VERSION=(dir Product.exe).VersionInfo.ProductVersion | |
| $DIR="X:\Deployment\Product\$VERSION-$TODAY-${bamboo.deploy.release}\" | |
| Write-Host "Saving artifacts to $DIR" | |
| New-Item -itemtype directory $DIR | |
| Copy-Item * $DIR |
| ### Keybase proof | |
| I hereby claim: | |
| * I am warden on github. | |
| * I am radek (https://keybase.io/radek) on keybase. | |
| * I have a public key whose fingerprint is EC0E E21F 7C06 E7A7 7AF8 5D7D 701F 4D48 17DB AA21 | |
| To claim this, I am signing this object: |
| # To install: | |
| # curl -s https://gist.githubusercontent.com/warden/1bb14afe27afd26b5727/raw/gistfile1.txt > ~/.bash_profile_gist && grep -q -F 'bash_profile_gist' ~/.bashrc || sed -i '1s/^/. ~\/.bash_profile_gist \n/' ~/.bashrc | |
| # | |
| # For MAC users (as sed on MAC OS X is stupid ;) ): | |
| # curl -s https://gist.githubusercontent.com/warden/1bb14afe27afd26b5727/raw/gistfile1.txt > ~/.bash_profile_gist && grep -q -F 'bash_profile_gist' ~/.bashrc || sed -i -e '~' '1s/^/. ~\/.bash_profile_gist\'$'\n/' ~/.bash_profile \'$'\n | |
| alias update-bash-profile='curl -s https://gist.githubusercontent.com/warden/1bb14afe27afd26b5727/raw/gistfile1.txt > ~/.bash_profile_gist && grep -q -F "bash_profile_gist" ~/.bashrc || sed -i "1s/^/. ~\/.bash_profile_gist \n/" ~/.bashrc' | |
| ## SSH AGENT ## |
| echo "Downloading JDK..." | |
| curl -L -b "oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz -O | |
| echo "Downloading Tomcat..." | |
| curl -L http://ftp.piotrkosoft.net/pub/mirrors/ftp.apache.org/tomcat/tomcat-8/v8.0.24/bin/apache-tomcat-8.0.24.tar.gz -O | |
| tar zxf jdk-8u51-linux-x64.tar.gz | |
| tar zxf apache-tomcat-8.0.24.tar.gz | |
| PWD=$(pwd) |
##Date and Time
=TIMEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " ")) + DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))
##Date
=DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))
##Time