Put the ruby file in .git/hooks/post-commit
Create a deploy script as .deploy_*
Example:
# File: .deploy_production
scp -R html example.com:public_html
Then use "deploy *
" in your commit message.
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
/* global google */ | |
var GoogleMapComponent = Ember.Component.extend({ | |
places: [], | |
width: 500, | |
height: 500, | |
attributeBindings: ['style'], | |
style: function () { | |
return 'width:'+this.width+'px; height:'+this.height+'px'; |
Put the ruby file in .git/hooks/post-commit
Create a deploy script as .deploy_*
Example:
# File: .deploy_production
scp -R html example.com:public_html
Then use "deploy *
" in your commit message.
My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.
As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.
I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.
So, in order to profile your worker, add this to your Sidekiq configuration:
if ENV["PROFILE"]
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000