Skip to content

Instantly share code, notes, and snippets.

View catchamonkey's full-sized avatar
👨‍💻

Chris Sedlmayr catchamonkey

👨‍💻
View GitHub Profile
/* Profile Collection */
{
"_id" : ObjectId("54aeab798c4158100f8b4567"),
"name" : "A Profile",
"createdAt" : ISODate("2015-01-08T16:08:25.000Z"),
"addresses" : {
"0" : {
"name" : "Address 1"
}
}
<?php
/**
* sfWidgetFormChoiceAutocomplete represents a multiple select displayed as an autocomplete input and a list of checkboxes.
*
*
* @package symfony
* @subpackage widget
* @author Gerald Estadieu <gestadieu@usj.edu.mo>
* @version
*/
@catchamonkey
catchamonkey / gist:780168
Created January 14, 2011 20:24
Blackberry Facebook errors
Warning (2): file_get_contents(https://graph.facebook.com/BlackBerry/posts) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request [APP/controllers/fp_controller.php, line 15]
Notice (8): Trying to get property of non-object [APP/controllers/fp_controller.php, line 20]
Warning (2): Invalid argument supplied for foreach() [APP/controllers/fp_controller.php, line 20]
Example: You have a branch 'refactor' that is quite different from master. You can't merge all of the
commits, or even every hunk in any single commit or master will break, but you have made a lot of
improvements there that you would like to bring over to master.
# on master
> git co -b temp
# on temp
> git merge --no-commit --no-ff refactor
/**
* Provides requestAnimationFrame in a cross browser way.
* @author greggman / http://greggman.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.requestAnimationFrame ||
@catchamonkey
catchamonkey / ioreg.battery.sh
Created August 3, 2011 20:54
Display some battery information about your Mac
ioreg -w0 -l | grep -E "Capacity|Cycle Count|DesignCycleCount"
@catchamonkey
catchamonkey / Base Layout
Created August 5, 2011 21:04
base.html.twig
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% stylesheets
'@SedlmayrReportsBundle/Resources/public/css/styles.css'
'@SedlmayrReportsBundle/Resources/public/css/reset.css'
%}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" />
@catchamonkey
catchamonkey / Call List Template
Created August 5, 2011 21:09
calls.html.twig
{% extends "::base.html.twig" %}
{% stylesheets
'@SedlmayrReportsBundle/Resources/public/css/listReport.css'
%}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" />
{% endstylesheets %}
{% block body %}
@catchamonkey
catchamonkey / skipSpotify.applescript
Created August 11, 2011 15:17
Apple Script to Skip Spotify Track (before my buttons worked)
tell application "System Events" to set appList to name of application processes whose frontmost is true
set activeApp to item 1 of appList
tell application "Spotify" to activate
tell application "System Events"
tell process "Spotify"
click menu item 3 of menu 1 of menu bar item 6 of menu bar 1
end tell
end tell
tell application activeApp to activate