Skip to content

Instantly share code, notes, and snippets.

@webdev1001
webdev1001 / cookies.js
Created October 1, 2015 16:32 — forked from dmitry-korolev/cookies.js
Simple functions to work with cookies. Plain JS.
/**
* @link https://learn.javascript.ru/cookie
*/
function setCookie(name, value, options) {
options = options || {};
var expires = options.expires;
if (typeof expires == "number" && expires) {
@webdev1001
webdev1001 / howto-manually-add-trust-cert-to-rubygems.md
Last active September 16, 2015 01:10
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

@webdev1001
webdev1001 / repel.js
Last active August 29, 2015 14:16 — forked from debloper/repel.js
// Set the element to select; the only moving part here
// Like literally...
var elem = document.querySelector("elem")
, html = document.querySelector("html");
// Apply positioning, just in case it wasn't already
elem.style.position = "absolute";
// Take the viewport height/width into consideration
// @TODO: should be updated on window resize
<?php
//* Add beaver-page body class
add_filter( 'body_class', 'beaver_body_class' );
function beaver_body_class( $classes ) {
$classes[] = 'beaver-page';
return $classes;
}
/* Beaver Builder Full Width Page*/
.beaver-page.fl-builder .content,
.beaver-page.fl-builder .content .page,
.beaver-page.fl-builder .content-sidebar-wrap,
.beaver-page.fl-builder .site-container,
.beaver-page.fl-builder .site-inner {
background: none;
border: 0;
float: none;
<?php
/**
* Template Name: Page Builder
*
* This page template only works with Genesis child themes and works great with the
* Beaver Builder plugin. Learn more: http://clickwp.com/blog/beaver-builder/
*/
// Force full width content layout to remove sidebar
<?php
// Don't include the PHP tag
genesis_widget_area( 'optin', array(
'before' => '<div id="sfws-optin" class="sfws-optin widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
<?php
//* Do NOT include the opening php tag
//* Remove the edit link
add_filter ( 'genesis_edit_post_link' , '__return_false' );

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);