This file contains 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
namespace :db do | |
DUMP_FMT = 'p' # 'c', 'p', 't', 'd' | |
desc 'Dumps the database to backups' | |
task sql_dump: :environment do | |
dump_sfx = suffix_for_format(DUMP_FMT) | |
backup_dir = backup_directory(true) | |
cmd = nil | |
with_config do |app, host, db, user| | |
file_name = Time.now.strftime("%Y%m%d%H%M%S") + "_" + db + '.' + dump_sfx |
This file contains 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
# @author: Ashish Gawikwad <ash.gkwd@gmail.com> | |
# @license: MIT License | |
# @script: It contains all the functions and aliases which | |
# are frequently used by author. | |
# | |
sleepToRAM () { | |
dbus-send --system --print-reply \ | |
--dest="org.freedesktop.UPower" \ | |
/org/freedesktop/UPower \ |