This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for file in path-to-scss/**/*.scss; do sass-convert $file ${file%scss}sass && rm $file; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com'); | |
| UPDATE wp_links SET link_url = replace(link_url, 'http://olddomain.com','http://newdomain.com'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com','http://newdomain.com'); | |
| UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin responsive-ratio($x,$y, $pseudo: false) { | |
| $padding: unquote( ( $y / $x ) * 100 + '%' ); | |
| @if $pseudo { | |
| &:before { | |
| @include pseudo($pos: relative); | |
| width: 100%; | |
| padding-top: $padding; | |
| } | |
| } @else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $default-feature: min-width | |
| =media($query: $feature $value) | |
| @if length($query) == 1 | |
| @media screen and ($default-feature: nth($query, 1)) | |
| @content | |
| @else | |
| $loop-to: length($query) | |
| $media-query: "screen and " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'aws-sdk' | |
| require 'pathname' | |
| require 'yaml' | |
| CONFIG = { | |
| "distPath" => "public/dist", | |
| "stylesheetsPath" => "public/dist/stylesheets", | |
| "javascriptsPath" => "public/dist/javascripts", | |
| "fontsPath" => "public/dist/fonts" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Smartphones (portrait and landscape) ----------- */ | |
| @media only screen and (min-device-width: 320px) and (max-device-width: 480px) { /* Styles */ } | |
| /* Smartphones (landscape) ----------- */ | |
| @media only screen and (min-width: 321px) { /* Styles */ } | |
| /* Smartphones (portrait) ----------- */ | |
| @media only screen and (max-width: 320px) { /* Styles */ } | |
| /* iPads (portrait and landscape) ----------- */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| 'use strict'; | |
| if ('serviceWorker' in navigator) { | |
| navigator.serviceWorker | |
| .register('/assets/javascripts/service-worker.js') | |
| .then(function (registration) { | |
| console.info('Service Worker Registered'); | |
| }).catch(function (e) { | |
| console.error('Error during service worker registration:', e); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my closeNotif() | |
| on closeNotif() | |
| tell application "System Events" | |
| tell process "Notification Center" | |
| set theWindows to every window | |
| repeat with i from 1 to number of items in theWindows | |
| set this_item to item i of theWindows | |
| try | |
| click button 1 of this_item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// @argument {number (with unit)} $px | |
| /// | |
| /// @access public | |
| @function pxToRem($px) | |
| @return (round(remove-unitless($px)) / remove-unitless($font-size-base-px))+rem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $products_args = array( | |
| 'post_type' => 'products', | |
| 'posts_per_page' => 10 | |
| ); | |
| $products_query = new WP_Query($products_args); | |
| ?> | |
| <?php if ($products_query->have_posts()): ?> | |
| <?php while ($products_query->have_posts()): $products_query->the_post(); ?> |