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);| #!/bin/bash | |
| sum_pages=0 | |
| for file in *.pdf ; do | |
| cur_pages=$(pdfinfo $file | awk '/Pages/{print $2}') | |
| echo "pdf: $file has $cur_pages pages." | |
| sum_pages=$(( sum_pages + cur_pages)) | |
| done | |
| echo "All pdf files in this directory have $sum_pages pages." |
| #!/bin/bash | |
| # LibreOffice headless server script | |
| # | |
| # chkconfig: 2345 80 30 | |
| # description: headless openoffice server script | |
| # processname: libreoffice | |
| # | |
| # Author: Vic Vijayakumar | |
| # Modified by Federico Ch. Tomasczik | |
| # and then by Mark Pavlichuk |
| $(document).ready(function () { | |
| var masonryOptions = { | |
| columnWidth: '.masonry-sizer', | |
| itemSelector: '.masonry-item', | |
| percentPosition: true | |
| }; | |
| var $masonryContainer = $('.masonry-container'); | |
| var masonryBreakpoint = 767; // change this as you wish | |
| var masonryActive = false; | |
| var activateMasonry = function () { |
| <?php | |
| /** | |
| * Enqueue scripts and styles. | |
| * | |
| * @since 1.0.0 | |
| */ | |
| function ja_global_enqueues() { | |
| wp_enqueue_style( | |
| 'jquery-auto-complete', |
| function get_visitor_ip() { | |
| $ip = ''; | |
| if ($_SERVER['HTTP_CLIENT_IP']) | |
| $ip = $_SERVER['HTTP_CLIENT_IP']; | |
| else if($_SERVER['HTTP_X_FORWARDED_FOR']) | |
| $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
| else if($_SERVER['HTTP_X_FORWARDED']) | |
| $ip = $_SERVER['HTTP_X_FORWARDED']; | |
| else if($_SERVER['HTTP_FORWARDED_FOR']) | |
| $ip = $_SERVER['HTTP_FORWARDED_FOR']; |
| /** | |
| * mm_register function. | |
| * Register a new user. | |
| * @access public | |
| * @return User errors or user is logged in. | |
| */ | |
| function mm_register() { | |
| if(!is_user_logged_in()) { | |
| if(!empty($_POST)) { |
| <?php | |
| /* | |
| Plugin Name: tinyLogin | |
| Plugin URI: http://wp.tribuna.lt/tiny-login | |
| Description: A simple front-end login/registration system. Adds template tags and shortcodes. Shortcodes: [tiny_form_login]/[tiny_form_register]. Template tags: get_tiny_form_login()/get_tiny_form_register() and the_tiny_form_login()/the_tiny_form_register() | |
| Version: 0.1 | |
| Author: Arūnas | |
| Author URI: http://wp.tribuna.lt/ | |
| Text Domain: tiny_login | |
| */ |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso