Skip to content

Instantly share code, notes, and snippets.

View sonnygauran's full-sized avatar

Sonny Gauran sonnygauran

  • Metro Manila, Philippines
View GitHub Profile
@sonnygauran
sonnygauran / index.html
Created November 16, 2015 06:40 — forked from anonymous/index.html
Bootstrap 3 vertically centered modal and scroll fixes Bootstrap 3 vertically centered modal and scroll fixes // source http://jsbin.com/wixako
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 3 vertically centered modal and scroll fixes</title>
<meta name="description" content="Bootstrap 3 vertically centered modal and scroll fixes">
<!-- include bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style id="jsbin-css">
/* scroll fixes */
@sonnygauran
sonnygauran / frontendDevlopmentBookmarks.md
Created October 21, 2015 00:40 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@sonnygauran
sonnygauran / getChildCategories.php
Last active August 29, 2015 14:06 — forked from wilhelm-murdoch/getChildCategories.php
Recursively get Magento categories and children. Parameter to return only ID, and active only.
function getCategories(Mage_Catalog_Model_Category $ParentCategory, $id_only = false, $active = true) {
$return = array();
foreach(explode(',', $ParentCategory->getChildren()) as $categoryId) {
$Category = Mage::getModel('catalog/category')->load($categoryId);
if ($Category->getIsActive()) {
if ($id_only) {
$return[] = $categoryId;
} else {
$return[$categoryId] = array(