Skip to content

Instantly share code, notes, and snippets.

View mirzu's full-sized avatar

Michal Minecki mirzu

View GitHub Profile
@mirzu
mirzu / .gitconfig
Created October 21, 2011 22:05
Mike's .gitconfig
[color]
diff = auto
status = auto
branch = auto
[push]
default = tracking
[core]
editor = mvim -f
[alias]
co = checkout
<?php
// how the session variable is used in the system module.
if (isset($_SESSION['ignore_slave_server'])) {
if ($_SESSION['ignore_slave_server'] >= REQUEST_TIME) {
Database::ignoreTarget('default', 'slave');
}
else {
unset($_SESSION['ignore_slave_server']);
}
test
@mirzu
mirzu / gist:2844183
Created May 31, 2012 15:31
alias file
<?php
// put the below in a file in ~/.drush/slc.alaises.drushrc.php
// allows commands like
// drush sql-sync @stage @mirzu
// -- to move the staging db to your sandbox
// and commands like
// drush rsync @stage @mirzu
// -- to move the files directory from staging to your sandbox
// with a couple of modifications it works with you local box as well.
@mirzu
mirzu / gist:3077162
Created July 9, 2012 15:25
sample drupal "json"
{
"apiVersion":"1.0",
"entityType":"node",
"entityID":"4",
"url":"http:\/\/project.loco:8080\/?q=node\/4",
"authorId":"1",
"authorName":"admin",
"authorUrl":"http:\/\/project.loco:8080\/?q=user\/1",
"created":"1340365718",
"changed":"1340365718",
@mirzu
mirzu / gist:3079599
Created July 9, 2012 22:56
Causing Search issue.
<div class="table"><a name="table-guide-change-log"></a><p class="title"><b></b></p><div class="table-contents"><table summary="" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; " width="100%"><colgroup><col class="c1"></col><col class="c2"></col><col class="c3"></col><col class="c4"></col></colgroup><thead><tr><th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">Date</th><th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">Version</th><th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">Name</th><th style="border-bottom: 0.5pt solid ; ">Summary</th></tr></thead><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">2011-12-16</td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">0.2 </td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; ">A. Elssamadisy </td><td style="border-bottom: 0.5pt solid ; ">
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:activity="http://activitystrea.ms/spec/1.0/">
<id>tag:photopanic.example.com,2009:/activity/4859/1643</id>
<title>Geraldine posted a photo to the My Pets album.</title>
<published>2010-06-21T00:28:35Z</published>
<link rel="alternate" type="text/html" href="http://example.com/geraldine/activities/1643" />
<author>
<name>Geraldine</name>
<uri>http://example.com/geraldine</uri>
<id>tag:photopanic.example.com,2009:person/4859</id>
<activity:object-type>person</activity:object-type>
@mirzu
mirzu / gist:3148330
Created July 20, 2012 02:42
slashdot test
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
<channel rdf:about="http://slashdot.org/">
<title>Slashdot</title>
<link>http://slashdot.org/</link>
<description>News for nerds, stuff that matters</description>
<dc:language>en-us</dc:language>
<dc:rights>
Copyright 1997-2012, Geeknet, Inc. All Rights Reserved.
</dc:rights>
<dc:date>2012-07-20T02:40:27+00:00</dc:date>
@mirzu
mirzu / gist:3148450
Created July 20, 2012 03:18
mangospring example stream
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Mangospring Activity Feeds</title>
<entry>
<title>Jonny Depp created an Event</title>
<link href="/events/2112"/>
<updated>Fri Jun 11 06:20:14 UTC 2010</updated>
<author>
<name>Jonny Depp</name>
<url>https://engage.mangospring.com/ce/pulse/user/profile/2321</url>
<activity:object-type>
Request:
https://local.engageexpress.com/api/activitystreams/feeds/users/1/groups/14/wall?ap
i_key=69753c309dd86a1f&app_name=engage&signature=b11547f9f05bcff92a06106d6b8a36a880
49832b
Response:
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Engage Activity Feeds</title>
<entry>
<title>Jonny Robert wrote on Group Marketing's Wall</title>
<link href="https://engage.mangospring.com/ce/pulse/user/projectteam/433"/>