Skip to content

Instantly share code, notes, and snippets.

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

Wasim Shaikh wasim117

🏠
Working from home
View GitHub Profile
@wasim117
wasim117 / init_custom.ftl
Created September 21, 2021 19:20
How to add Custom setting in Liferay Theme
<#--
This file allows you to override and define new FreeMarker variables.
-->
<#assign
show_header = getterUtil.getBoolean(themeDisplay.getThemeSetting("show-header"))
/>
@wasim117
wasim117 / init.ftl
Created September 21, 2021 18:42
Liferay Theme Init Template (FTL)
<#-- ---------- Common variables ---------- -->
<#assign
theme_display = themeDisplay
portlet_display = portletDisplay
layoutSet = layout.getLayoutSet()
theme_timestamp = themeDisplay.getTheme().getTimestamp()
theme_settings = themeDisplay.getThemeSettings()
body{font-size:16px;}
alert("js load from gist");
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Special title 1</h5>
<p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
@wasim117
wasim117 / os_browser_detection.js
Last active August 29, 2015 14:07
Get Operating system and browser using JavaScript
var os = (function() {
var ua = navigator.userAgent.toLowerCase();
return {
isWin : /windows/.test(ua),
ismacOs : /mac os/.test(ua)
};
}());
var browser = (function() {
var ua = navigator.userAgent.toLowerCase();
@wasim117
wasim117 / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@wasim117
wasim117 / meetupApiTest
Created August 25, 2014 07:04
meetupAPITest
<!DOCTYPE html>
<html>
<head>
<title>Meetup Groups by Member ID</title>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.getJSON("https://api.meetup.com/2/groups?callback=?&sign=true&member_id=8377069&page=20&api&key=4d6354b6970177437494d3e6a41414b&only=name,link",
function (data) {
var htmlString = "";
@wasim117
wasim117 / breadcrumbs.js
Created July 21, 2012 19:17
Adding zindex to breadcrumbs dynamically
jQuery(document).ready(function(){
var breads = jQuery("ul.breadcrumbs li").length; // count the number of list items
jQuery("ul.breadcrumbs li").each(function(){
jQuery(this).css("z-index", breads); // add z-index starting from largest first
breads = breads -1; // decrease z-index to smallest
})
});
@wasim117
wasim117 / document-loading.html
Created November 4, 2011 11:36
Showing progress cursor when page is loading.
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demo Page</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>
<body>
<img src="http://mms.space.swri.edu/MMSposter-large.jpg" />