Skip to content

Instantly share code, notes, and snippets.

View jsor's full-sized avatar
💨

Jan Sorgalla jsor

💨
View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
<title>jCarousel Examples</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<!--
jQuery library
-->
<script type="text/javascript" src="../lib/jquery-1.4.2.min.js"></script>
// Visit the profile page of the organisation (e.g. https://github.com/facebook) and ensure you're logged in. Then run the following javascript code using Firebug
var x = new XMLHttpRequest(), user = location.pathname.substr(1), s = user.indexOf('/');
if (s != -1) {
user = user.substring(0, s);
};
x.open("POST","/users/follow?target="+user, true);
x.send('request_uri=/'+user+'&authenticity_token='+window._auth_token);
@jsor
jsor / gist:1433998
Created December 5, 2011 15:40
DoctrineGISSchemaHandler
<?php
namespace DoctrineGIS\Schema;
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\CustomSchemaHandler;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Table;
CREATE TABLE geo (id INT NOT NULL, PRIMARY KEY(id));
SELECT AddGeometryColumn('geo', 'point', -1, 'POINT', 2);
SELECT AddGeometryColumn('geo', 'linestring', -1, 'LINESTRING', 2);
SELECT AddGeometryColumn('geo', 'polygon', -1, 'POLYGON', 2);
SELECT AddGeometryColumn('geo', 'multipoint', -1, 'MULTIPOINT', 2);
SELECT AddGeometryColumn('geo', 'multilinestring', -1, 'MULTILINESTRING', 2);
SELECT AddGeometryColumn('geo', 'multipolygon', -1, 'MULTIPOLYGON', 2);
SELECT AddGeometryColumn('geo', 'geometrycollection', -1, 'GEOMETRYCOLLECTION', 2);
CREATE SEQUENCE geo_id_seq INCREMENT BY 1 MINVALUE 1 START 1
diff --git a/lib/Doctrine/DBAL/Schema/Comparator.php b/lib/Doctrine/DBAL/Schema/Comparator.php
index 0544c6e..39c712b 100644
--- a/lib/Doctrine/DBAL/Schema/Comparator.php
+++ b/lib/Doctrine/DBAL/Schema/Comparator.php
@@ -355,6 +355,18 @@ class Comparator
$changedProperties[] = 'comment';
}
+ $options1 = $column1->getPlatformOptions();
+ $options2 = $column2->getPlatformOptions();
diff --git a/lib/Doctrine/DBAL/Schema/Column.php b/lib/Doctrine/DBAL/Schema/Column.php
index 46e7fe5..135aef7 100644
--- a/lib/Doctrine/DBAL/Schema/Column.php
+++ b/lib/Doctrine/DBAL/Schema/Column.php
@@ -94,6 +94,11 @@ class Column extends AbstractAsset
protected $_comment = null;
/**
+ * @var array
+ */
@jsor
jsor / .travis.yml
Created March 2, 2012 10:59
TravisCI/HipChat Webhook
notifications:
webhooks: http://example.com/travisci-hipchat-webhook.php
$fp = fopen("data.UTF-8.xml", "r");
stream_filter_prepend($fp, "convert.iconv.UTF-8/ISO-8859-1");
$converted = '';
while (!feof($fp)) {
$converted .= fread($fp, 1000);
}
<?php
class ConnectionEventSubscriber implements EventSubscriber
{
public function getSubscribedEvents()
{
return array(
Events::postConnect
);
}
Promise::when(array($promise1, $promise2))
->then(function($resultOfPromise1, $resultOfPromise2) {
});
// VS.
Promise::when(array($promise1, $promise2))
->then(function(array $resultsOfPromisesAsArray) {
});