Command: heroku pgbackups:capture --remote production
Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712
Command: heroku pgbackups:url [db_key] --remote production
module ApplicationHelper | |
def current_theme | |
# path to use diffrent theme for project and subprojects | |
unless instance_variable_defined?(:@current_theme) | |
theme = Setting.ui_theme | |
if not @project.nil? | |
if @project.root? | |
if File.directory?("#{Rails.public_path}/themes/#{@project.identifier}") | |
theme = @project.identifier | |
end |
ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |
find -L . -type f -name "*.rhtml" | while read FNAME; do cp $FNAME `dirname $FNAME``echo '/'``basename $FNAME .rhtml`.html.erb; done |
# linux is awsome | |
# first.csv | |
# A | |
# B | |
# C | |
# D | |
# second.csv | |
# B |
for name in *.ogg; do ffmpeg -i "$name" "$name.mp3"; done; |
fetch = +refs/pull/*/head:refs/remotes/origin/pr/* |
echo "1T" | sed -e 's/t/kg/i;s/g/km/i;s/m/kk/i;s/k/*1024/ig;s/b//i' | bc |
def s3_form_tag(options = {}) | |
bucket = options[:bucket] | |
access_key_id = options[:access_key_id] | |
secret_access_key = options[:secret_access_key] | |
key = options[:key] || '' | |
content_type = options[:content_type] || '' # Defaults to binary/octet-stream if blank | |
redirect = options[:redirect] || '/' | |
acl = options[:acl] || 'public-read' | |
expiration_date = options[:expiration_date].strftime('%Y-%m-%dT%H:%M:%S.000Z') if options[:expiration_date] | |
max_filesize = options[:max_filesize] || 671088640 # 5 gb |
# Get info about all Contexts in ldap | |
ldapsearch -x -H ldap://localhost -b "" -s base configContext namingContexts monitorContext | |
# display cn=config structures and data | |
ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=config" | |
# or | |
slapcat -b cn=config > config.ldiff | |
# modify config |