Skip to content

Instantly share code, notes, and snippets.

@jesders
jesders / gist:e02d99d3fe88011648b05ee1ba43e09b
Created April 15, 2020 12:25 — forked from ivandoric/gist:e4e46294c4d35eac0ec8
wordpress: create custom reset password page
<?php //Add all of this tu custom page template ?>
<?php
global $wpdb;
$error = '';
$success = '';
// check if we're in reset form
if( isset( $_POST['action'] ) && 'reset' == $_POST['action'] )
{
@jesders
jesders / gist:40281204ff9dd8cf18a5020e104a6248
Created April 15, 2020 12:24 — forked from ivandoric/gist:11215045
shell: SCP cheat sheet
Copy the file "foobar.txt" from a remote host to the local host
$ scp your_username@remotehost.edu:foobar.txt /some/local/directory
Copy the file "foobar.txt" from the local host to a remote host
$ scp foobar.txt your_username@remotehost.edu:/some/remote/directory
Copy the directory "foo" from the local host to a remote host's directory "bar"
$ scp -r foo your_username@remotehost.edu:/some/remote/directory/bar
Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu"
tar -cvzf backup.tar * //packing
tar zxvf file_name.tar.gz * //unpacking
@jesders
jesders / gist:a8202a34e2271956da402ad34f0e9e22
Created April 15, 2020 12:21 — forked from ivandoric/gist:11219508
wordpress: is_tree function - Check if on certain page or on page children function
<?php
function is_tree($pid) {
global $post;
$anc = get_post_ancestors( $post->ID );
foreach($anc as $ancestor) {
if(is_page() && $ancestor == $pid) {
return true;
}
}
if(is_page()&&(is_page($pid)))
@jesders
jesders / meta-tags.md
Created December 5, 2019 16:23 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@jesders
jesders / css-media-queries-cheat-sheet.css
Created May 17, 2019 14:05 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }