Skip to content

Instantly share code, notes, and snippets.

View mgalang's full-sized avatar

Marc Galang mgalang

View GitHub Profile
@mgalang
mgalang / new_kohana_app.sh
Created May 14, 2012 11:17
Basic installation script for Kohana 3.2
git init
git submodule add git://github.com/kohana/core.git system
git submodule add git://github.com/kohana/database.git modules/database
git submodule add git://github.com/kohana/userguide.git modules/userguide
git submodule add git://github.com/kohana/image.git modules/image
git submodule add git://github.com/kohana/codebench.git modules/codebench
git submodule add git://github.com/kohana/auth.git modules/auth
git submodule add git://github.com/kohana/pagination.git modules/pagination
git submodule add git://github.com/kohana/orm.git modules/orm
@mgalang
mgalang / gist:065a5522c638f97c1a6a
Created March 28, 2013 12:05
Kohana database transaction
$db = Database::instance();
// start
$db->query(null,'START TRANSACTION');
// rollback
$db->query(null,'ROLLBACK');
// commit
$db->query(null,'COMMIT');
@mgalang
mgalang / d8_snippets.md
Last active June 17, 2022 13:58
Drupal 8 snippets

Create link from text and url

$url = Url::fromRoute($route_name);
$link = Link::fromTextAndUrl($text, $url);

Create link from route

$link = Link::createFromRoute('Link Text', 'route_name')->getUrl();

Keybase proof

I hereby claim:

  • I am mgalang on github.
  • I am marcgalang (https://keybase.io/marcgalang) on keybase.
  • I have a public key ASCxh0YpYNjtVx-sGZkfvu1ej3TAjsjp7Xfq2274byF_SAo

To claim this, I am signing this object: