Please note that this is not a complete-step-by-step solution but rather a set of notes that might help to build Gearman 1.1.6 on Centos 5.9.
Some other helpful notes can be found here: http://gearman.info/build/centos5-8.html
| #!/bin/bash | |
| # Disclaimer - make backups, use at your own risk. | |
| # | |
| # Based on this comment: http://stackoverflow.com/a/13944924/843067 | |
| # Views and stored procedures have to be done separately. | |
| OLDDB="old_db_name" | |
| NEWDB="new_db_name" | |
| MYSQL="mysql -u root -pyour_password " |
Please note that this is not a complete-step-by-step solution but rather a set of notes that might help to build Gearman 1.1.6 on Centos 5.9.
Some other helpful notes can be found here: http://gearman.info/build/centos5-8.html
| ּ_בּ | |
| בּ_בּ | |
| טּ_טּ | |
| כּ‗כּ | |
| לּ_לּ | |
| מּ_מּ | |
| סּ_סּ | |
| תּ_תּ | |
| ٩(×̯×)۶ | |
| ٩(̾●̮̮̃̾•̃̾)۶ |
| backend default { | |
| .host = "127.0.0.2"; | |
| .port = "80"; | |
| } | |
| sub vcl_recv { | |
| set req.backend = default; | |
| return(lookup); | |
| } |
| # approx apache process count | |
| ps -eLf | grep httpd | wc -l | |
| # total and average memory stats | |
| ps -ylC httpd --sort:rss | awk '{sum+=$8; ++n} END {print "Tot="sum"("n")";print "Avg="sum"/"n"="sum/n/1024"MB"}' |
| #!/bin/bash | |
| # | |
| # Checks if git repository at $1 does not have modified files | |
| # | |
| function is_dirty { | |
| GIT_DIR="$1/.git" GIT_WORK_TREE="$1" git diff --quiet | |
| if [[ $? == 0 ]]; then | |
| return 1 | |
| else |
| #!/usr/bin/env ruby | |
| # | |
| # Usage: | |
| # irbify.rb script.rb | heroku run rails console --app=my-app | |
| # | |
| # Why eval and not piping directly? Piping directly would run all lines even if previous line was an invalid statement. | |
| # | |
| script_name = ARGV[0] |
| <?php | |
| $json = array( | |
| 'values' => array( | |
| 0 => array( | |
| 'field' => 'id1', | |
| 'value' => 895 | |
| ), | |
| 1 => array( | |
| 'field' => 'id2', |
| if Rails.env.test? | |
| module ActionDispatch | |
| module Routing | |
| module UrlFor | |
| alias_method :original_url_options, :url_options | |
| def url_options | |
| if self.respond_to? :request | |
| original_url_options.merge({:host => request.host, :port => request.port}) | |
| else |
| #!/bin/bash | |
| # | |
| # Sets-up ACL for current + www-data users to allow writing to folder by both and deleting files created by each other. | |
| # This simplifies some Symfony2 dev tasks | |
| # | |
| # *** NOT TO BE USED IN PRODUCTION SERVERS IN ANY WAY ***. | |
| # | |
| if [ -z "$1" ]; then |