Skip to content

Instantly share code, notes, and snippets.

$browser-context: 16px !default;
@function strip-unit($num) {
@return $num / ($num * 0 + 1);
}
@function convert-to-rem($value, $base-value: $browser-context) {
// stylelint-disable length-zero-no-unit
$value: strip-unit($value) / strip-unit($base-value) * 1rem;
<?php
namespace App;
/**
* Custom Blade directives
*/
add_action('after_setup_theme', function () {
/**
* Icon Blade directives
*/
<?php
namespace App;
class PatreonAPI {
private $access_token;
public function __construct($access_token) {
$this->access_token = $access_token;
}
public function fetch_user() {
return $this->__get_json('current_user');
}
@nboliver
nboliver / shareurls
Created April 20, 2017 23:13 — forked from essmahr/shareurls
Share Urls
https://twitter.com/intent/tweet?url=[url]
https://plus.google.com/share?url=[url]
https://www.linkedin.com/shareArticle?mini=true&url=[url]&title=[title]
https://www.facebook.com/sharer.php?u=[url]
https://pinterest.com/pin/create/button/?url=[url]&media=[url]
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<p>A paragraph (from the Greek paragraphos, &ldquo;to write beside&rdquo; or &ldquo;written beside&rdquo;) is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.</p>
<blockquote>
<p>A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text.</p>
<p>It is typically distinguished visually using indentation and a different typeface or smaller size quotation. It may or may not include a citation, usually placed at the bottom.</p>
## Delete all files with exceptions
find . -not -name "wp-config.php" -not -name ".htaccess" -not -name "mytar.tar.gz" -exec rm -rf {} \;
## Create tar file excluding all from .tarignore
tar -c --exclude-from=.tarignore -vzf myfile.tar.gz *
## Create tar file without ._ files and excluding other files
COPYFILE_DISABLE=true tar -zcvf mytarfile.tar.gz --exclude='myfile.php' *
## Extract tar file