Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Chris Sedlmayr catchamonkey

🎯
Focusing
Block or report user

Report or block catchamonkey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f7a8cd7cc7f4777a36c6
/* Profile Collection */
{
"_id" : ObjectId("54aeab798c4158100f8b4567"),
"name" : "A Profile",
"createdAt" : ISODate("2015-01-08T16:08:25.000Z"),
"addresses" : {
"0" : {
"name" : "Address 1"
}
}
View gist:e26eb7607f7a2893af5a
@catchamonkey
catchamonkey / placeholder.js
Created Apr 5, 2013
JavaScript placeholder polyfill.
View placeholder.js
function isPlaceholderSupported() {
var input = document.createElement("input");
return ('placeholder' in input);
}
var placeholdersupport = isPlaceholderSupported();
// find the elements that are advertising this behaviour
// then setup each one
$("[data-behaviour='placeholder']").each(function() {
View logicalOrTest.php
$constraint = $this->logicalOr(
$this->equalTo('foo'), $this->equalTo('bar')
);
$this->assertThat('foo', $constraint);
@catchamonkey
catchamonkey / setfacl.sh
Created Oct 24, 2012
Fedora setfacl within a Symfony project for cache and log dirs
View setfacl.sh
sudo setfacl -R -m u:apache:rwx -m u:`whoami`:rwx app/cache app/logs
sudo setfacl -dR -m u:apache:rwx -m u:`whoami`:rwx app/cache app/logs
@catchamonkey
catchamonkey / gist:3600265
Created Sep 2, 2012
Symfony2.1.0-RC2 Install Problem
View gist:3600265
$ php ../composer.phar install
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for jms/di-extra-bundle == 1.1.9999999.9999999-dev -> satisfiable by jms/di-extra-bundle 1.1.x-dev.
- Can only install one of: jms/di-extra-bundle dev-master, jms/di-extra-bundle 1.1.x-dev.
- Installation request for jms/di-extra-bundle == 9999999-dev -> satisfiable by jms/di-extra-bundle dev-master.
@catchamonkey
catchamonkey / mailtoLinkTracking.js
Created May 30, 2012
Infinity Tracking - Custom Trigger for all mailto links
View mailtoLinkTracking.js
/**
* Registers a click handler for all mailto links on the page and fires
* an Infinity Tracking custom trigger when clicked
* We use 'live' for mailto links loaded after the DOM is ready
* @author Chris Sedlmayr <chris.sedlmayr@infinity-tracking.com>
*/
// copy of initialise the infinity var
var _ictt = _ictt || [];
$(document).ready(function() {
// find 'a' elements that have an href starting with mailto:
View scaryYetAwesome.php
<?php
class Sedlmayr {
private $_gender;
private $_name;
public function __construct()
{
View gitproblem
A git problem.
I Created and checked out a new branch called 'feature'
I created files, worked on them, committed changes and pushed upstream.
I Carried on working on the new files, made further changes, then thought these additional changes should belong in a different feature.
While on the 'feature' branch I ran git checkout -b sub_feature master
Oops, I really should have just created this branch based on my current 'feature' branch as it's a sub feature and therefore dependent on it.
So I then ran another wrong command, git reset . to reset my tree back to the known state, unfortunately that was of course the state of master, not my actual 'feature' like I wanted.
So I thought, hey I'll just checkout the 'feature' again, then start from there. But of course it won't let me as I have untracked files that already exist in the branch I want to checkout.
@catchamonkey
catchamonkey / git_push_current_branch
Created Feb 15, 2012
git push to current branch
View git_push_current_branch
git push origin `git rev-parse --abbrev-ref HEAD`
You can’t perform that action at this time.