Skip to content

Instantly share code, notes, and snippets.

View rubiadias's full-sized avatar

Rubia Dias rubiadias

  • Curitiba - Brasil
View GitHub Profile
@jchild3rs
jchild3rs / gist:470be49a4bc4caf3ca8a
Last active April 8, 2020 15:54
Hologram Gulp Plugin
/*
// Usage:
gulp.task('docs', function(cb) {
gulp.src('path/to/your/src')
.pipe(hologram(cb));
});
*/
var gulp = require('gulp'),
notify = require('gulp-notify'),
@EdEichman
EdEichman / zopim_defer.js
Last active March 30, 2025 19:50
Defer Loading Zopim until page is loaded (to avoid long load delay), based on article http://www.feedthebot.com/pagespeed/defer-loading-javascript.html
//basic zopim widget code, from their site
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//v2.zopim.com/?26Smu9lv0NXQEOOg8IAZrMPh9yQstAcV';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
//make sure zopim does not show till we know we have department agents
var intial_zopim_hiding_done = false;
@dbwhddn10
dbwhddn10 / SassMeister-input.scss
Created July 26, 2014 03:31
Generated by SassMeister.com.
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
// -----------------------------------------------------------------------------
// Introduction
// -----------------------------------------------------------------------------
// Here is hacky and experimental solution for cross-scopes extends
anonymous
anonymous / exemplo.html
Created June 24, 2014 01:07
classe pra slideshow
<div id="slider1">
<ul class="slideshow"></ul>
<a href="#" class="prev">Anterior</a>
<a href="#" class="next">Próximo</a>
<div class="page"></div>
</div>
<div id="slider2">
<ul class="slideshow"></ul>
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created March 19, 2014 09:02
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// -----------------------------------------------------------------------------
// Introduction
// -----------------------------------------------------------------------------
// Here is hacky and experimental solution for cross-scopes extends
@JTLR
JTLR / ie.scss
Created February 13, 2014 22:26
Sass mixin for rem sizing with IE8 and below fallback using HTML IE conditional stylesheets
$stylesheet: 'ie';
@import 'rem-function';
.element {
margin: rem(20);
}
@aaronwaldon
aaronwaldon / 1) readme.md
Last active March 30, 2025 19:51
How to set up Gulp for Compass compilation and minification, JavaScript minification, livereloading, and use with ExpressionEngine.

How to set up Gulp with an ExpressionEngine project

I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).

Install Node.js

  • If Node is not yet installed on the machine, it will need to be installed

Install Gulp (if needed)

$ sass -t expanded test01.scss
test01.scss:10 DEBUG: list of 3 values:
test01.scss:14 DEBUG: - (string) a
test01.scss:14 DEBUG: - (color) #bada55
test01.scss:14 DEBUG: - (number) 42
test01.scss:10 DEBUG: list of 2 values:
test01.scss:14 DEBUG: - (bool) false
test01.scss:14 DEBUG: - (string) yummy
test01.scss:14 DEBUG: (number) 14px
test01.scss:14 DEBUG: (string) gloubiboulga
export default function share(social, text, url, image) {
if (social !== "fb" && social !== "twitter" && social !== "pinterest") {
console.log("Share not found");
return false;
}
var share_url = url || window.location.href;
var sharer = ''
const windowWidth = 626;
const windowHeight = 436;
/*
** Opacity
*/
.opacity(@opacity: 0.5) {
-moz-opacity: @opacity;
-khtml-opacity: @opacity;
-webkit-opacity: @opacity;
opacity: @opacity;
@opperc: @opacity * 100;
-ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=@{opperc})";