Skip to content

Instantly share code, notes, and snippets.

View faaezahmd's full-sized avatar

Faiz Ahmed faaezahmd

View GitHub Profile
@faaezahmd
faaezahmd / asynchronous.js
Created April 4, 2019 08:58 — forked from joepie91/asynchronous.js
PHP vs Node.js: Synchronous vs Asynchronous
console.log("Before the first file is read.");
hypotheticalFileGetContents("sample.txt", function(fileContents){
// fileContents now contains the file contents, this function is only called when the file read in the background has finished
console.log("After the first file has completed reading.");
});
// You've now told it to start the first read, but it won't 'block' your script execution. It will do the read in the background, and immediately move on with the rest of your code.
console.log("Before the second file is read.");
hypotheticalFileGetContents("sample2.txt", function(fileContents){
// Lets us create Taxonomy for Custom Post Type
add_action( 'init', 'jobs_custom_taxonomy', 0 );
//create a custom taxonomy name it "type" for your posts
function jobs_custom_taxonomy() {
$labels = array(
'name' => _x( 'Types', 'taxonomy general name' ),
'singular_name' => _x( 'Type', 'taxonomy singular name' ),
'search_items' => __( 'Search Types' ),
'all_items' => __( 'All Types' ),
@faaezahmd
faaezahmd / git_workflow_best_practices.md
Created September 26, 2022 12:13 — forked from calaway/git_workflow_best_practices.md
Git Workflow Best Practices

Git Branch Merging Best Practices

  1. After you've selected a feature to work on, create a branch in your local repo to build it in.
    • $ git checkout -b calaway/short_description_of_feature
  2. Implement the requested feature, make sure all tests are passing, and commit all changes in the new branch.
  3. Checkout the master branch locally.
    • $ git checkout master
  4. Pull down the master branch from GitHub to get the most up to date changes from others. If you practice git workflow as described here you should never have a merge conflict at this step.
    • $ git pull origin master
  5. Make sure all tests are passing on master and then checkout your new branch.
  • $ git checkout calaway/short_description_of_feature
const COUNTRY_CODES = [
{
name: 'Afghanistan +93',
id: '+93',
code: 'AF',
},
{
name: 'Aland Islands +358',
id: '+358',
code: 'AX',