Skip to content

Instantly share code, notes, and snippets.

View bksubramanyarao's full-sized avatar
💎
Looking for freelance projects

Subramanya Rao bksubramanyarao

💎
Looking for freelance projects
View GitHub Profile
@bksubramanyarao
bksubramanyarao / xampp_php7_xdebug.md
Created November 13, 2020 11:42 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@bksubramanyarao
bksubramanyarao / new-in-php-7-X.md
Created September 23, 2020 03:09 — forked from rotexdegba/new-in-php-7-X.md
A list of changes in PHP 7.0+ all on one page

New Stuff in PHP 7.0

  1. Scalar type definitions: they come in two flavours: coercive (default) and strict. The following types for parameters can now be enforced (either coercively or strictly): strings (string), integers (int), floating-point numbers (float), and booleans (bool). They augment the other types introduced in PHP 5: class names, interfaces, array and callable.
    • https://blog.programster.org/php-strict-types
    • Typed pass-by-reference Parameters gotcha: Declared types of reference parameters are checked on function entry, but not when the function returns, so after the function had returned, the argument's type may have changed. For example:
    <?php
    function array_baz(array &$param)
    {

$param = 1;

@bksubramanyarao
bksubramanyarao / server.conf
Created February 16, 2020 04:32 — forked from iliakan/server.conf
Nginx configuration for separated frontend and backend endpoints
upstream example-webpack {
server 127.0.0.1:8080;
}
upstream example-backend {
server 127.0.0.1:3000;
}
server {
listen 80;
@bksubramanyarao
bksubramanyarao / change-html-tag-with-jquery.js
Created July 10, 2019 15:14
Change HTML Tag with jQuery
$('#leftmenuinnerinner h2.left').each(() => {
var h_text=$(this).text();
$(this).replaceWith(() => {
return `<a href="#">---${h_text}---</a>`;
});
});
@bksubramanyarao
bksubramanyarao / express-generator-locally.txt
Last active November 17, 2018 04:47
how to use express-generator locally
how to use express-generator locally
npm install express
npm install express-generator --save-dev
node full path to \node_modules\express-generator\bin\express-cli.js myapp --view=ejs
@bksubramanyarao
bksubramanyarao / wp-query-ref.php
Created October 1, 2018 02:11 — forked from luetkemj/wp-query-ref.php
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/