This file contains hidden or 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
| SUMMARY | |
| I like to use kcachegrind for doing profiling on my ruby code. Most of my development | |
| is done on OSX, and while you can install kcachegrind via macports, it takes forever | |
| because it has to build KDE, as well. Much to my surprise, the fine folks who | |
| wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on | |
| OSX without too much effort, only having to install QT and GraphViz. Yippie! | |
| I'm running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I'm sure | |
| it will build just fine on earlier versions of Xcode, but I haven't tested it. |
This file contains hidden or 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
| #!/bin/sh | |
| # | |
| # Script to prepare and restore full and incremental backups created with innobackupex-runner. | |
| # | |
| # This script is provided as-is; no liability can be accepted for use. | |
| # | |
| INNOBACKUPEX=innobackupex-1.5.1 | |
| INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX | |
| TMPFILE="/tmp/innobackupex-restore.$$.tmp" |
This file contains hidden or 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
| #!/bin/sh | |
| # | |
| # Script to prepare and restore full and incremental backups created with innobackupex-runner. | |
| # | |
| # This script is provided as-is; no liability can be accepted for use. | |
| # | |
| INNOBACKUPEX=innobackupex-1.5.1 | |
| INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX | |
| TMPFILE="/tmp/innobackupex-restore.$$.tmp" |
This file contains hidden or 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
| <?php | |
| use Symfony\Component\Translation\TranslatorInterface; | |
| function format(\DateTime $date, TranslatorInterface $translator) | |
| { | |
| $diff = date_create()->diff($date); | |
| $seconds = $diff->days * 86400 + $diff->h * 3600 + $diff->i * 60 + $diff->s; | |
| $format = $translator->transChoice('reldate', $seconds); |
This file contains hidden or 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
| require "rubygems" | |
| require "sinatra" | |
| require "json" | |
| # Configure this with the directory path for the Web server's clone of the Git repo | |
| git_dir = '/var/www/origin.git' | |
| # Configure the mappings between Git branches and Web document roots | |
| branch_to_working_directory = { | |
| 'www' => '/var/www/www.example.com', |
This file contains hidden or 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
| # Set cache dir | |
| proxy_cache_path /var/cache/nginx levels=1:2 | |
| keys_zone=microcache:5m max_size=1000m; | |
| # Virtualhost/server configuration | |
| server { | |
| listen 80; | |
| server_name yourhost.domain.com; | |
| # Define cached location (may not be whole site) |
This file contains hidden or 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
| <?php | |
| namespace Clever\Presenter\CoreBundle\Assetic\Filter; | |
| use Assetic\Filter\BaseCssFilter; | |
| use Assetic\Asset\AssetInterface; | |
| /** | |
| * Fixes relative CSS urls. | |
| * Support of Symfony relative bundles url |
This file contains hidden or 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
| imports: | |
| - { resource: parameters_dev.yml } | |
| - { resource: config.yml } | |
| - { resource: config_local.yml, ignore_errors: true } | |
| framework: | |
| profiler: | |
| only_exceptions: false | |
| web_profiler: |
This file contains hidden or 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
| /var/lib/redis/dump.rdb { | |
| # rotate every day and keep 30 backups | |
| daily | |
| rotate 30 | |
| missingok | |
| # rename backups dump.rdb-YYYYMMDD | |
| # instead of dump.rdb.X: more rsync friendly | |
| dateext | |
| # create a new dump | |
| postrotate |
This file contains hidden or 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
| <?php | |
| namespace Assetic\Filter; | |
| use Assetic\Asset\AssetInterface; | |
| use Assetic\Util\ProcessBuilder; | |
| /** | |
| * Runs assets through gzip. | |
| */ |