Skip to content

Instantly share code, notes, and snippets.

View 1ed's full-sized avatar

Gábor Egyed 1ed

  • Budapest, Hungary
  • 12:22 (UTC +02:00)
  • X @1edgbr
View GitHub Profile
@weppos
weppos / capistrano_database_yml.rb
Created July 27, 2008 10:04
Provides a couple of tasks for creating the database.yml configuration file dynamically when deploy:setup is run.
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <[email protected]>
# Copyright:: 2007-2010 The Authors
#!/bin/bash
# Expand globs to null when there are no matches
shopt -s nullglob
# Look for either a '<subdir>/console' or a 'symfony' file
until
file=(*/console symfony); [[ -f "$file" ]] && php "$file" "$@" && exit;
do
[[ "$PWD" == "/" ]] && break;
<?php
$enable_xhprof = apc_fetch('enable_xhprof');
if($enable_xhprof)
{
xhprof_enable(XHPROF_FLAGS_MEMORY, array('ignored_functions' => array('call_user_func',
'call_user_func_array')));
}
define('SF_ROOT_DIR', realpath(dirname(__FILE__).'/..'));
<?php
if($enable_graphite)
{
$fp = @fsockopen('127.0.0.1', 2003, $errno, $errstr, 1);
if($fp)
{
$out = array();
@netj
netj / memusg
Last active May 23, 2025 07:37
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <[email protected]>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
@desandro
desandro / jquery.imagesloaded.js
Created January 26, 2011 18:01 — forked from paulirish/README.md
$.fn.imagesLoaded jQuery plugin
// $('img.photo',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// Modified with a two-pass approach to changing image
// src. First, the proxy imagedata is set, which leads
// to the first callback being triggered, which resets
// imagedata to the original src, which fires the final,
// user defined callback.
@matthewmccullough
matthewmccullough / git-deletealltags.bsh
Created April 1, 2011 20:29
Script to delete all tags both locally and remotely
for t in `git tag`
do
git push origin :$t
git tag -d $t
done
@weaverryan
weaverryan / Makefile
Created May 5, 2011 11:36
Example sphinx configuration for rendering the symfony docs
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build -c .
PAPER =
BUILDDIR = build
SOURCE = source
Fatal error: Uncaught exception 'RuntimeException' with message '/Users/igor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error': Could not find RubyGem sass (>= 0) (Gem::LoadError)
from /Users/igor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:219:in `activate'
from /Users/igor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:1065:in `gem'
from /Users/igor/.rvm/gems/ruby-1.9.2-p0/bin/sass:18:in `<main>'
' in /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Filter/Sass/SassFilter.php:167
Stack trace:
#0 /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Filter/FilterCollection.php(57): Assetic\Filter\Sass\SassFilter->filterLoad(Object(Assetic\Asset\FileAsset))
#1 /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Asset/BaseAsset.php(71): Assetic\Filter\FilterCollection->filterLoad(Object(Assetic\Asset\FileAsset))
#2 /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Asset/FileAsset.php(41): Assetic\Asset\BaseAsset->doLoad('body {?