A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);
/** | |
* version1: convert online image | |
* @param {String} url | |
* @param {Function} callback | |
* @param {String} [outputFormat='image/png'] | |
* @author HaNdTriX | |
* @example | |
convertImgToBase64('http://goo.gl/AOxHAL', function(base64Img){ | |
console.log('IMAGE:',base64Img); | |
}) |
// Writing JS for everything is great and all, but I don't want to see JS | |
// inline in my Jade templates. Thankfully, there are ways of abstrating it | |
// into mixins! | |
// Want some Rails-like helpers? | |
mixin link_to(name, href) | |
- href = href || "#" | |
a(href="#{href}")= name | |
// How about a single editing point for a class name? |
If you have this error: Unknown SSL error -12218 mapped to net::ERR_SSL_PROTOCOL_ERROR | |
and your upwork client does not run you need: | |
sudo apt-get install libnss3=2:3.15.4-1ubuntu7 libnss3-nssdb=2:3.15.4-1ubuntu7 | |
sudo apt-mark hold libnss3 libnss3-nssdb | |
Solution provided by Ilya E from upwork. |
!function(a,b){a.MixItUp.prototype.addAction("_constructor","pagination",function(){var b=this;b.pagination={limit:0,loop:!1,generatePagers:!0,maxPagers:5,pagerClass:"",prevButtonHTML:"«",nextButtonHTML:"»"},a.extend(b.selectors,{pagersWrapper:".pager-list",pager:".pager"}),a.extend(b.load,{page:1}),b._activePage=null,b._totalPages=null,b._$pagersWrapper=a()},1),a.MixItUp.prototype.addAction("_init","pagination",function(){var a=this;a._activePage=1*a.load.page,a.pagination.maxPagers="number"==typeof a.pagination.maxPagers&&a.pagination.maxPagers<5?5:a.pagination.maxPagers},1),a.MixItUp.prototype.addAction("_bindHandlers","pagination",function(){var b=this;b.pagination.generatePagers&&(b._$pagersWrapper=a(b.selectors.pagersWrapper)),b.controls.live?b._$body.on("click.mixItUp."+b._id,b.selectors.pager,function(){b._processClick(a(this),"page")}):b._$pagersWrapper.on("click.mixItUp."+b._id,b.selectors.pager,function(){b._processClick(a(this),"page")})},1),a.MixItUp.prototype.addAction("_processClick |
<?php | |
/* ====================================================== | |
This script is NOT FULLY TESTED (not tested on Windows Server either) | |
USE AT YOUR OWN RISK - development environment Ubuntu Linux 14.04.3 LTS | |
The purpose of this script is for small websites and blogs | |
to have their existing media to work through Amazon S3 | |
There's a great plugin, WP Offload S3, that we'll be tapping | |
into...it works great for new media, but this is a quick |
<?php | |
/** | |
* Count number of widgets in a sidebar | |
* Used to add classes to widget areas so widgets can be displayed one, two, three or four per row | |
*/ | |
function slbd_count_widgets( $sidebar_id ) { | |
// If loading from front page, consult $_wp_sidebars_widgets rather than options | |
// to see if wp_convert_widget_settings() has made manipulations in memory. | |
global $_wp_sidebars_widgets; |
Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)
api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});
GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3
<!-- Social: Facebook / Open Graph --> | |
<meta property="fb:admins" content="503386332"> | |
<meta property="fb:app_id" content="1389892087910588"> | |
<meta property="og:url" content="http://scotch.io/bar-talk/bootstrap-3-tips-and-tricks-you-might-not-know"> | |
<meta property="og:type" content="article"> | |
<meta property="og:title" content="Bootstrap 3 Tips and Tricks You Might Not Know"> | |
<meta property="og:image" content="/wp-content/uploads/2014/05/bs31.jpg"/> | |
<meta property="og:description" content="Bootstrap 3 has a ton of features and helpers to speed up front-end development. Sometimes you need something and you end up writing your own custom CSS and JavaScript without even realizing that Bootstrap could have done it for you...."> | |
<meta property="og:site_name" content="Scotch"> | |
<meta property="article:author" content="https://www.facebook.com/NCerminara"> |