Skip to content

Instantly share code, notes, and snippets.

View cinghaman's full-sized avatar
🏠
Working from home

Amanpreet Singh cinghaman

🏠
Working from home
View GitHub Profile
@cinghaman
cinghaman / gist:008e4874ed4ceb33fd3f
Created March 26, 2016 15:51
Trying to convert bootstrap wp-navwalker to have a accordion menu instead of dropdwn line 24 and 85 needs to be dynamic
<?php
/**
* Class Name: wp_bootstrap_navwalker
* GitHub URI: https://github.com/twittem/wp-bootstrap-navwalker
* Description: A custom WordPress nav walker class to implement the Bootstrap 3 navigation style in a custom theme using the WordPress built in menu manager.
* Version: 2.0.4
* Author: Edward McIntyre - @twittem
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@cinghaman
cinghaman / gist:43dbb6243487766c8ec3
Created February 3, 2016 23:15
divi child theme css
/*
Theme Name: DemoChild
Theme URI: http://www.elegantthemes.com/gallery/divi/
Version: 1.0.0
Description: Smart. Flexible. Beautiful. Divi is the most powerful theme in our collection.
Author: Elegant Themes
Author URI: http://www.elegantthemes.com
Tags: responsive-layout, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-background, custom-colors, featured-images, full-width-template, post-formats, rtl-language-support, theme-options, threaded-comments, translation-ready
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@cinghaman
cinghaman / index.html
Created September 1, 2012 21:06
Five lines of jQuery for a paralax scrolling background
<div>
<h1>Paralax effect without a plugin</h1>
<h2>The Odyssey</h2>
<p><cite>By Homer</cite></p>
<p><date>Written 800 B.C.E</date></p>
<p>Tell me, O muse, of that ingenious hero who travelled far and wide after he had sacked the famous town of Troy. Many cities did he visit, and many were the nations with whose manners and customs he was acquainted; moreover he suffered much by sea while trying to save his own life and bring his men safely home; but do what he might he could not save his men, for they perished through their own sheer folly in eating the cattle of the Sun-god Hyperion; so the god prevented them from ever reaching home. Tell me, too, about all these things, O daughter of Jove, from whatsoever source you may know them.</p><p>So now all who escaped death in battle or by shipwreck had got safely home except Ulysses, and he, though he was longing to return to his wife and country, was detained by the goddess Calypso, who had got him into a large cave and wanted to marry him. But as
@cinghaman
cinghaman / jquery snippet - populating href
Created August 31, 2012 02:46
Dynamically populating href with jquery
This section goes into your body or where ever you want it to be displayed
<a href="" class="b-template" title="title" Preview</a>
<a href="" class="d-template" title="title" Preview</a>
<a href="" class="p-template" title="title" Preview</a>
<a href="" class="f-template" title="title" Preview</a>
---------------------------------------------------------
This would be added to your header section
@cinghaman
cinghaman / cakephp.htaccess
Created April 27, 2012 07:47
Cakephp .htaccess code
If you have a cakephp installation and want to add additional folders in public_html edit your root .htaccess file with this
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/site.*
RewriteCond %{REQUEST_URI} !-f
RewriteRule (.*) app/webroot/$1 [L]
RewriteCond %{REQUEST_URI} !^/site.*
RewriteCond %{REQUEST_URI} !-d
RewriteRule (.*) app/webroot/$1 [L]