Blog

Showing 31 to 40 of 48 posts.

HTML link phone/mobile number, make it callable

Posted on November 16th, 2019 in Miscellaneous by George

HTML5 includes protocols such as tel: or mailto: for the browser to use. The browsers implement differently the protocols, some will launch the phone app and add the number ready to be used and others directly execute the call if permission is granted.

Read more...

smallest multiple shortest solution JavaScript

Posted on October 2nd, 2019 in JavaScript by George

function sM(v,p) {
const g=(a,b)=>b===0||a===0?a+b:g(b,a%b),l=(a,b)=>a*b/g(a,b);
let m=p?v:1,x=p?p:v,c=m;
while(m<x)c=l(c,++m);
return c;
}

// provide one or two numbers(subsequent)
sM(23);
sM(18,23);

Read more...

Falling letters tutorial css, javascript

Posted on September 22nd, 2019 in Miscellaneous by George

Vanilla js letters and words falling animation

Read more...

Get methods of an object PHP

Posted on September 22nd, 2019 in PhP by George

 

Easy way to inspect the available methods of an object in PHP by using get_class and get_class_methods built-in functions.

 

Read more...

Linux Symlink Folder (soft link, symbolic link) Eloquent explanation

Posted on June 19th, 2019 by George

Create a  symbolic link (symlink):

ln - create link between files (hard link)
ln -s - create symbolic link instead of hard link

Read more...

JavaScript Async function and Await

Posted on April 26th, 2019 by George

 

 

Async/await gives to JavaScript function the ability to be paused and then resumed again when the value is resolved or rejected and then returned to await part, inside of the body of the function.

 

Read more...

Encrypt and decrypt string of text example with Node JS in 5 steps

Posted on April 4th, 2019 in NodeJS by George

Cryptography is about constructing and analyzing protocols that prevent third parties or the public from reading private messages. Various aspects of information security such as data confidentialitydata integrityauthentication, and non-repudiation are central to modern cryptography. Node package library offers a few alternatives for encryption. In this example will use 

npm install node-rsa

Read more...

Drush commands you need to know

Posted on March 24th, 2019 in Drupal by George

5 Drush commands you need to know to be able to manage Drupal websites from drush command line shell.

Visit https://drushcommands.com/ for all available commands. 

 

Read more...

React mixins, Why use mixins?

Posted on January 23rd, 2019 in JavaScript by George

First of all, the reason for wich I would avoid to use mixins is that you ar are bound to use React.createClass() or create-class-module, ES6 classes are not compatibile with React mixins. 

If you are not familiar with how mixins look like, take a look at the following example:

ES5

var PureRenderMixin = require('react-addons-pure-render-mixin');

var Button = React.createClass({
  mixins: [PureRenderMixin],

  // ...

});

 

 

Read more...

How to center fixed elements with JavaScript and jQuery

Posted on November 20th, 2018 in JavaScript by George

Sometime using top, right, bottom and left on a fixed element is not enough. 

I am sure you have been in the situation when you want to center a div container, image or other any html element which is position fixed.  In this article you will find out how to center any block element in the center of the screen using JavaScript and jQuery.

This is going to be achived using jQuery but can be done with plain JavaScript as well.

Follow the article to find out more.

Read more...

Categories