Skip to content

Instantly share code, notes, and snippets.

View nurcinozer's full-sized avatar
🎯
Focusing

Nurçin nurcinozer

🎯
Focusing
View GitHub Profile
@ozcanzaferayan
ozcanzaferayan / README.MD
Last active May 23, 2023 13:08
React Native SVGR Usage

SVG file (./src/images/ic_youtube.svg):

<?xml version="1.0" ?>
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
  <path d="M21.582,6.186c-0.23,-0.86 -0.908,-1.538 -1.768,-1.768C18.254,4 12,4 12,4S5.746,4 4.186,4.418c-0.86,0.23 -1.538,0.908 -1.768,1.768C2,7.746 2,12 2,12s0,4.254 0.418,5.814c0.23,0.86 0.908,1.538 1.768,1.768C5.746,20 12,20 12,20s6.254,0 7.814,-0.418c0.861,-0.23 1.538,-0.908 1.768,-1.768C22,16.254 22,12 22,12S22,7.746 21.582,6.186zM10,15.464V8.536L16,12L10,15.464z" fill="#000000FF"/>
</svg>

CLI usage:

svgr ./src/images -d ./src/svg --native --icon --svg-props "width=24,height=24"
@juliuzfan
juliuzfan / loop-sticky-posts.php
Created November 28, 2011 00:56
Custom WP Query For Sticky Posts Only
<?php
/**
Custom Query for Sticky Posts only
----------------------------------
*/
$sticky = get_option( 'sticky_posts' );
$args = array(
'posts_per_page' => 2, // Number of sticky posts to get
'post__in' => $sticky,
'ignore_sticky_posts' => 1