Effect simulating a tilting sheet of paper to reveal the navigation menu
A Pen by Marco Fugaro on CodePen.
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone [email protected]:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync [email protected]:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
<?php | |
/* | |
Plugin Name: Divide Meta Fields with Comma (Really Simple CSV Importer add-on) | |
*/ | |
add_filter('really_simple_csv_importer_save_meta', function($meta, $post, $is_update) { | |
foreach ($meta as $key => $value) { | |
if (strpos($value, ',') !== false) { | |
$_value = preg_split("/,+/", $value); | |
$meta[$key] = $_value; |
<!-- Open Graph Tags --> | |
<meta property="og:site_name" content="[[++site_name]]" /> | |
<meta property="og:type" content="article" /> | |
<meta property="og:title" content="[[*longtitle:default=`[[*pagetitle]]`]]" /> | |
<meta property="og:description" content="[[*description:default=`[[++site_description]]`]]" /> | |
<meta property="og:url" content="[[~[[*id]]? &scheme=`full`]]" /> | |
<meta property="og:image" content="[[*image:default=`[[++site_image]]`]]" /> | |
<meta property="fb:app_id" content="[[++fb_app_id]]" /> | |
<meta property="article:publisher" content="[[++fb_url]]" /> | |
<!-- Twitter Tags --> |
Effect simulating a tilting sheet of paper to reveal the navigation menu
A Pen by Marco Fugaro on CodePen.
@echo off | |
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
<?php | |
# Fill our vars and run on cli | |
# $ php -f db-connect-test.php | |
$dbname = 'name'; | |
$dbuser = 'user'; | |
$dbpass = 'pass'; | |
$dbhost = 'host'; | |
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
{'pdoCrumbs' | snippet : [ | |
'showHome' => 1, | |
'showHidden' => 0, | |
'tpl' => '@INLINE <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> | |
<a href="{{+link}}" itemscope itemtype="http://schema.org/Thing" itemprop="item"> | |
<span itemprop="name">{{+menutitle}}</span> | |
</a> | |
<meta itemprop="position" content="{{+idx}}" /> | |
</li>', | |
'tplCurrent' => '@INLINE <li class="active" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> |
<?php | |
// Add page name to body classes | |
function add_page_name_class($classes) | |
{ | |
global $post; | |
if ( is_page() || is_singular() ) { | |
$classes[] = sanitize_html_class($post->post_name); | |
} | |
return $classes; | |
} |