Authenticated Redirects

When a user visits our app, we want them to go directly to their dashboard if they are already signed-in.  I’m working with AngularJS and Firebase so I worked with this recipe for accomplishing this task:

 

 

Ref: http://stackoverflow.com/a/27215254/4742733

Customs Links for Front Page >> Featured Pages

After trying for some time to add custom links to “Home Feature Page one” and being unable to do so, I could find a solution to trick the Customizr Theme into creating “Featured Pages” for the Front Page.  Broken down in a few steps this is what we need to do:

 

Step 1

Activate the Customizer Child Theme  to easily set up a child theme for Customizr or create a child theme manually.  Now, in the functions.php  file, add this snippet of code (ref).

 

 

 

Step 2

Now, create “dummy pages” for each Featured Page.  I am calling them “dummy” because they themselves will not contain any content in them.  However, the title should be something which you want as the heading for the featured page since the title will appear on the front page.  Get the postId for this page.

YouTube Video for finding the postId for a page

 

Step 3

Finally, add the post ID  and its corresponding link  in the code snippet you pasted in the functions.php  file.

 

[fa class=”fa-flag”]  You should now have custom links in Featured Page section of the Front Page.

References

WordPress support on this https://wordpress.org/support/topic/how-to-link-home-feature-page-to-a-category

Customizer Child Theme http://docs.presscustomizr.com/article/35-how-to-customize-the-customizr-wordpress-theme

Code Snippet http://presscustomizr.com/snippet/setting-custom-links-featured-pages-customizr/

Search Repositories Based On Number Of Stars / Stargazers.

Sometimes, we may be looking for popular repositories – for example when we want to know what repos are popular within the community so that we too can work with them in our projects.

Examples:


1. Searching all repositories having more than a number of stars

Enter stars:>50000 in the search bar and GitHub will return all repositories having more than 50000 stargazers.
github_searchbar


2. Searching for repositories having stars between two numbers

Enter stars:35000..40000 in the search bar and GitHub will return all repositories having between 35000 and 40000 stargazers.

github_searchbar_2


Reference : https://help.github.com/articles/searching-repositories/

Persuasion v/s Force

A dispute arose between the North Wind and the Sun, each claiming that he was stronger than the other. At last they agreed to try their powers upon a traveller, to see which could soonest strip him of his cloak. The North Wind had the first try; and, gathering up all his force for the attack, he came whirling furiously down upon the man, and caught up his cloak as though he would wrest it from him by one single effort: but the harder he blew, the more closely the man wrapped it round himself. Then came the turn of the Sun. At first he beamed gently upon the traveller, who soon unclasped his cloak and walked on with it hanging loosely about his shoulders: then he shone forth in his full strength, and the man, before he had gone many steps, was glad to throw his cloak right off and complete his journey more lightly clad.

persuasion is better than force

Reference: https://femmebot.github.io/google-type/

 

CORS issue with Font-Awesome

When the website is hosted on a different server and is then accessed through a different domain, the font-awesome sheet is not loaded (this may be happening only in Firefox and works fine with Chrome, etc).  I faced this issue with Microsoft Edge too.  Anyways, to avoid this issue and thus have the Font-Awesome sheet loaded, we add this line of code to .htaccess file which is located in WordPress root directory.

 

<IfModule mod_headers.c>
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>

 

Reference: https://wordpress.org/support/topic/font-awesome-not-working?replies=8