Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| license: gpl-3.0 |
| REM Replaces notepad.exe with notepad++. Here for reference since I can never find it | |
| REM Taken from here: http://blogs.itramblings.com/post/2009/02/08/How-to-replace-notepadexe-on-Windows-Server-2008.aspx | |
| @echo off | |
| echo Create Backup copies of the original notepad.exe | |
| copy C:\Windows\notepad.exe C:\Windows\notepad32.exe | |
| copy C:\Windows\System32\notepad.exe C:\Windows\System32\notepad32.exe | |
| copy C:\Windows\SysWOW64\notepad.exe C:\Windows\SysWOW64\notepad32.exe | |
| import org.apache.poi.ss.usermodel.* | |
| import org.apache.poi.hssf.usermodel.* | |
| import org.apache.poi.xssf.usermodel.* | |
| import org.apache.poi.ss.util.* | |
| import org.apache.poi.ss.usermodel.* | |
| import java.io.* | |
| class GroovyExcelParser { | |
| //http://poi.apache.org/spreadsheet/quick-guide.html#Iterator |
| def ant = new AntBuilder() | |
| ant.echo("This Message should show up") | |
| ant.project.buildListeners[0].messageOutputLevel = 0 | |
| ant.echo("This wont show up as long as level is zero") |
| desc "Updates the metadata for development version" | |
| task :devversion do | |
| Dir.chdir ENV['PWD'] | |
| md_file = File.join(ENV['PWD'], "metadata.rb") | |
| if File.exist?(md_file) | |
| begin | |
| require 'chef/cookbook/metadata' | |
| require 'versionomy' | |
| rescue LoadError |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| import java.util.ArrayList; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Future; | |
| import java.util.concurrent.LinkedBlockingQueue; | |
| import java.util.concurrent.ThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; |
| ====================================== | |
| Usage: | |
| Fetcher<Source, MyEntity> f = new Fetcher<Source, MyEntity>(source) { | |
| @Override | |
| public List<MyEntity> fetch(Pageable pageRequest) | |
| { | |
| return source.findAll(pageRequest); | |
| } | |
| }; |
| desc 'rolls back migrations in current branch not present in other' | |
| task :rollback_branch_migrations, [:other_branch] do |t, args| | |
| load "#{Dir.pwd}/Rakefile" | |
| branch_migrations = BranchMigrations.new(args.other_branch) | |
| puts ['Rollback the following migrations', branch_migrations, 'y,n? '] | |
| next if %w[no n NO N].include?(STDIN.gets.chomp) | |
| Rake::Task['environment'].invoke |
| rmdirs = { | |
| it = (it instanceof File) ? it : new File(it) | |
| if (!it.exists()) return | |
| it.eachDir(delDir) | |
| it.eachFile { it.delete() } | |
| it.delete() | |
| } |