Skip to content

Instantly share code, notes, and snippets.

View b00gizm's full-sized avatar
💭
I may be slow to respond.

Pascal Cremer b00gizm

💭
I may be slow to respond.
View GitHub Profile
<style type="text/css">
<!--
a.button {
background: transparent url('/img/mailbox_button_a.png') no-repeat scroll top right;
color: #444;
display: block;
float: left;
width: 133px;
height: 40px;
font-size: 1.2em;
TEST COMPARISON FROM TO DETAILS
=============================================================================
** TOTAL **: 2.52x as fast 3061.6ms +/- 3.9% 1214.4ms +/- 5.4% significant
=============================================================================
3d: - 442.2ms +/- 25.2% 340.6ms +/- 19.5%
cube: - 180.6ms +/- 54.0% 179.4ms +/- 34.4%
TEST COMPARISON FROM TO DETAILS
=============================================================================
** TOTAL **: *2.31x as slow* 735.4ms +/- 1.8% 1701.8ms +/- 1.8% significant
=============================================================================
3d: *1.54x as slow* 148.8ms +/- 1.6% 229.6ms +/- 1.4% significant
cube: *1.49x as slow* 56.6ms +/- 3.3% 84.6ms +/- 0.8% significant
mouseDragged: function(evt) {
var info = this._mouseDownInfo;
var layout = this.get('layout');
var parentLayout = this.get('parentView').get('layout');
var loc;
// handle X direction
loc = info.left + (evt.pageX - info.pageX);
// Create your SFHFHudView object (maybe inside of viewDidLoad:)
HUD = [[SFHFHUDView alloc] initWithFrame:[[UIApplication sharedApplication].keyWindow bounds]];
// Show your HUD
// remember: SFHFHudView is subclass of UIView, not UIView
[HUD setStatusText:@"Doing stuff ..."];
[HUD setShowsStatusLabel:YES];
[HUD startActivityIndicator];
[HUD makeKeyAndVisible];
<?php
/**
* This class provides easy access to your fixture data with Propel as ORM.
*
* I tried to use a similar approach like in Ruby on Rails.
* See: http://guides.rubyonrails.org/testing.html#the-low-down-on-fixtures
*
* @package default
* @author b00giZm
<?php
class sfPropelBuildTestSqlTask extends sfPropelBaseTask
{
protected function configure()
{
$this->addOptions(array(
new sfCommandOption('propel-ini', null, sfCommandOption::PARAMETER_OPTIONAL, 'The path to dedicated propel.ini', sfConfig::get('sf_test_dir').'/bootstrap/propel/propel.ini'),
new sfCommandOption('phing-arg', null, sfCommandOption::PARAMETER_REQUIRED | sfCommandOption::IS_ARRAY, 'Arbitrary phing argument'),
));
@b00gizm
b00gizm / gist:1106905
Created July 26, 2011 14:33
Spawning node.js processes with PHP
<?php
class Foo
{
// ...
protected function spawnProcess()
{
if (!function_exists('proc_open')) {
throw new \RuntimeException(
Feature: RickRollFriday
In order to rick-roll my team
As a team manager
I need to make sure that everyone reads this
Scenario: Do the rick-roll
Given Rick Astley
When you're no strangers to love
And you know the the rules
And so does he
@b00gizm
b00gizm / Apache error log
Created September 28, 2011 21:49
Pimple crashes my PHP (no, really.)
[Wed Sep 28 23:44:22 2011] [notice] child pid 42995 exit signal Segmentation fault (11)