Skip to content

Instantly share code, notes, and snippets.

View parhumm's full-sized avatar

Parhum Khoshbakht parhumm

View GitHub Profile
function() {
var virtualPagePath = '';
try {
// Add subdomain before page path
var locationSplitDot = window.location.host.split('.');
if (locationSplitDot && locationSplitDot[1]) {
if (locationSplitDot[0] !== 'www') {
virtualPagePath = location.host;
}
@parhumm
parhumm / virtualPagePath.js
Last active December 13, 2019 14:07
GTM virtualPagePath Variable
function virtualPagePath() {
/**
* Get the URL parameters
* source: https://css-tricks.com/snippets/javascript/get-url-variables/
* @param {String} url The URL
* @return {Object} The URL parameters
*/
var getParams = function (url) {
var params = {},
parser = document.createElement('a');
@parhumm
parhumm / SassMeister-input.scss
Created February 9, 2016 06:55
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
a {
color: blue;
&:hover {
color: red;
}
@parhumm
parhumm / SassMeister-input.scss
Last active August 29, 2015 14:08
Sass Media Queries Structure - Bootstrap Base: http://sassmeister.com/gist/52e69977e3278a4d409a
//
// Functions
//
// RANGES
// We use these functions to define ranges for various things, like media queries.
@function lower-bound($range){
@if length($range) <= 0 {
@return 0;
}
@parhumm
parhumm / SassMeister-input.scss
Created September 25, 2014 07:31
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
// @if
// @function
// @mixin
// Direction Controller
@parhumm
parhumm / SassMeister-input.scss
Last active August 29, 2015 14:06
Sass Media Queries Structure - Zurb Founation Base
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
//
// Article Info(Fun Part):
//
@mixin person($who) {
#{$who}-name: "Parhum Khoshbakht";
@parhumm
parhumm / SassMeister-input.scss
Created September 16, 2014 10:12
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
// Returns $list as a string
// -------------------------------------------------------------------------------
// @documentation http://sassylists.com/documentation/#debug
// -------------------------------------------------------------------------------
// @example debug(a b c d e) => [ a, b, c, d, e ]
//
// Article Info(Fun Part):
//
@mixin person($who) {
#{$who}-name: "Parhum Khoshbakht";
#{$who}-url: "http://parhum.net";
#{$who}-twitter: "@parhumm";
}
%article__info {
article-title: "Get Color Data";
<h1 class="header__logo">Header Logo</h1>
<span class="footer__logo">Footer Logo</span>
@parhumm
parhumm / gulpfile.js
Last active August 29, 2015 04:51 — forked from par6n/gulpfile.js
Git handler through Gulp, read hive.ir or contact me for more details.
// Example for handling git through gulp. Useful receipt for sometimes ;)
// hive.ir - made by Ehsaan <iehsan.ir@gmail.com>
// gulpfile.js
var gulp = require( 'gulp' );
var git = require( 'gulp-git' );
var minifyCss = require( 'gulp-minify-css' );
var uglify = require( 'gulp-uglify' );
var concat = require( 'gulp-concat' );
var fs = require( 'fs' );