Skip to content

Instantly share code, notes, and snippets.

View dancywritter's full-sized avatar
🏠
Working from home

Haroon Rasheed dancywritter

🏠
Working from home
View GitHub Profile
@dancywritter
dancywritter / alanStudio.js
Created August 5, 2020 20:45 — forked from adrianhajdin/alanStudio.js
Alan Studio Code Materials
intent('What does this app do?', 'What can I do here?',
reply('This is a news project.'));
const API_KEY = '7bdfb1b10aca41c6becea47611b7c35a';
let savedArticles = [];
// News by Source
intent('Give me the news from $(source* (.*))', (p) => {
let NEWS_API_URL = `https://newsapi.org/v2/top-headlines?apiKey=${API_KEY}`;
@dancywritter
dancywritter / Simple Ajax Login Form.php
Created July 22, 2020 11:35 — forked from cristianstan/Simple Ajax Login Form.php
Wordpress: Simple Ajax Login Form
<?php
//Simple Ajax Login Form
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/
?>
//html
<form id="login" action="login" method="post">
<h1>Site Login</h1>
<p class="status"></p>
<label for="username">Username</label>
@dancywritter
dancywritter / duplicate-title-checker.php
Created June 11, 2020 07:59 — forked from certainlyakey/duplicate-title-checker.php
Wordpress Duplicate Title Checker plugin (updated version)
<?php
/*
Plugin Name: Duplicate Title Checker (zip all related files to upload it)
Plugin URI: http://wordpress.org/extend/plugins/duplicate-title-checker/
Description: This plugin provides alert message for duplicate post title and unique post title when adding new post.
Author: Ketan Ajani, improved by fuchsws and certainlyakey (see http://wordpress.org/support/topic/suggestions-35?replies=2)
Version: 1.1
Author URI: http://www.webconfines.com
*/
@dancywritter
dancywritter / user-profile-picture.php
Created June 17, 2019 17:19 — forked from spigotdesign/user-profile-picture.php
Add WordPress image uploader to user profile.
/*
* Add custom user profile information
*
*/
add_action( 'show_user_profile', 'my_show_extra_profile_fields' );
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );
function my_show_extra_profile_fields( $user ) { ?>
@dancywritter
dancywritter / Readme.txt
Created June 15, 2019 06:49 — forked from vishalbasnet23/Readme.txt
Custom Activation Link on Sign Up WordPress
Step by step guide.
First Phase:
1.First create a html form with first name, last name and email field for signing up process.( Remember the action of the form it has to be the page slug of email confirmation page that you will be creating at in next phase. )
Second Phase :
1.Create a Page ( Remember the slug has to be the same of that of action of the form of phase one ) and assign the template template-confirmation-mail.php
2.This page is responsible for generating unqiue hash key and sending that hash key along with the user's new account credentials to their email.
3.Remember the link of the activation_link has to the link to the email-verification template, which we will be creating in next phase.
Third Phase :
1. Create a page and assign it to Email Verification Template.( Remember this template has to be assigned to the page that you sent in the mail in previous step )
2. This page is responsilble matching that unqiue key sent on the email once new user visit that page.
@dancywritter
dancywritter / html_for_international_calling coes.htm
Created June 11, 2019 19:52 — forked from andyj/html_for_international_calling coes.htm
HTML <select> international calling codes for each country
<!-- country codes (ISO 3166) and Dial codes. -->
<select name="countryCode" id="">
<option data-countryCode="GB" value="44" Selected>UK (+44)</option>
<option data-countryCode="US" value="1">USA (+1)</option>
<optgroup label="Other countries">
<option data-countryCode="DZ" value="213">Algeria (+213)</option>
<option data-countryCode="AD" value="376">Andorra (+376)</option>
<option data-countryCode="AO" value="244">Angola (+244)</option>
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option>
<option data-countryCode="AG" value="1268">Antigua &amp; Barbuda (+1268)</option>