Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rchavik on github.
  • I am rchavik (https://keybase.io/rchavik) on keybase.
  • I have a public key ASDIXr5FYAyUiXSjNCmbfi422jrSo7xTg-lW-WSRJgTZago

To claim this, I am signing this object:

@rchavik
rchavik / dbosource.diff
Created October 7, 2015 09:30
mysqlnd_ms support
diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php
index a01cee6..6204755 100644
--- a/lib/Cake/Model/Datasource/DboSource.php
+++ b/lib/Cake/Model/Datasource/DboSource.php
@@ -2304,6 +2304,7 @@ class DboSource extends DataSource {
if ($this->fullDebug) {
$this->logQuery('BEGIN');
}
+ $this->_connection->setAttribute(PDO::ATTR_AUTOCOMMIT, false);
return $this->_transactionStarted = $this->_connection->beginTransaction();
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://raw.githubusercontent.com/rchavik/zepto-dnd/5ab58c839be3c6a65b69354847726576ec40e2c6/zepto-dnd.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
h3, h4 {
margin: 5px;
@rchavik
rchavik / news_block.php
Created July 18, 2014 09:19
idea for element
<?php
if (!isset($latestNews)):
$result = ClassRegistry::init('Nodes.Node')->find('promoted');
$latestNews = $result[0];
endif;
if (!isset($latestPlace)):
$result = ClassRegistry::init('MyPlugin.Place')->find('latestPlace');
$latestPlace = $result[0];
@rchavik
rchavik / gist:8997823
Created February 14, 2014 08:50
git pr aliases
[alias]
pr = "!f() { git fetch -fu origin refs/pull/$1/head:pr/$1; } ; f"
prr = "!f() { git fetch -fu $1 refs/pull/$2/head:pr/$2; } ; f"
pru = "!f() { git fetch -fu upstream refs/pull/$1/head:pr/$1; } ; f"
pr-clean = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
git clone git://github.com/croogo/app myapp
cd myapp
git submodule add -f --name Croogo -b 1.6 git://github.com/croogo/croogo Vendor/croogo/croogo
git submodule add -f --name CakePHP git://github.com/cakephp/cakephp Vendor/cakephp/cakephp
git submodule add -f --name Search git://github.com/CakeDC/search Plugin/Search
git submodule add -f --name Migrations git://github.com/CakeDC/migrations Plugin/Migrations
set your vhost DocumentRoot to myapp/webroot and the install process should work
so, basically myapp is your own repo, which you can later customize and push to your own project repo
@rchavik
rchavik / .mailmap
Last active December 15, 2015 05:38
Croogo related files
AD7six <andydawson76@gmail.com> <andydawson76@yahoo.co.uk>
Ceeram <c33ram@gmail.com> <mayl@planet.nl>
Damien Biasotto <damien@occi-tech.com> <damien.biasotto@gmail.com>
Derbois Aymeric <aymeric@occi-tech.com> DERBOIS Aymeric <aymeric@derbois.com>
Derbois Aymeric <aymeric@occi-tech.com> DERBOIS Aymeric <aymeric@occi-tech.com>
Eko Tristiyono <eko@xintesa.com> eko <eko@xintesa.com>
Elias Coronado <ecor.rck@hotmail.com>
Fahad Ibnay Heylaal <fahad19@gmail.com> <contact@fahad19.com>
Grégory Salvan <gregory@occi-tech.com> gregory
<gregory@occi-tech.com> <apieum@gmail.com>
@rchavik
rchavik / reinstall.sh
Created December 18, 2012 04:20
quick reinstall script for croogo (useful for core development only)
#!/bin/bash
if [ "$1" = "-h" ] ; then
echo $0 "mysqluser mysqlpass dbname version quickmode"
echo
echo "version : [1.4|1.5]"
echo "quickmode : [y|n]"
echo
exit 0
fi
@rchavik
rchavik / thickbox.js
Created October 26, 2012 02:27
thickbox 3.1 used in croogo
/*
* Thickbox 3.1 - One Box To Rule Them All.
* By Cody Lindley (http://www.codylindley.com)
* Copyright (c) 2007 cody lindley
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
var tb_pathToImage = "/img/ajax/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
@rchavik
rchavik / release.sh
Created April 23, 2012 02:36
Croogo Release Helper script to create a zipball from a tag
#!/bin/bash
# which cake version that will be bundled in the zip file
CAKE_13_STABLE=1.3.15
CAKE_21_STABLE=2.1.4
CAKE_23_LATEST=2.3.0-RC1
# location of working repositories
CAKE_REPO=~/work/core/cake_2.0/
CROOGO_REPO=~/work/personal/deploy/croogo/