Customise your terminal bash prompt

If you are using OSX this is wonderful because you can customise your command line by adding emoji icons to the bash prompt.

You can find icons inside your Edit menu: Edit -> Emoji & Symbols.

Emoji and Symbols
EDIT -> Emoji and Symbols


How to add custom icons to our bash?

So edit your .bash_profile with your favourite editor vim, nano for example, and add the line:

PS1=" "

Open Emoji & Symbol panel and drag and drop your favorite emoji inside quotation marks.

Grag Emoji
Drag emoji inside quotation marks

Depending on terminal settings, nothing may be visible after using drag & drop. Close and reopen you terminal and voilà:

terminal-hbYou can customise terminal bash with some others options:

\d Current date
\t Current time
\h Host name
\# Command number
\u User name
\W Current working directory (ie: Desktop/)
\w Current working directory with full path

This is my favourite customisation:

PS1="🌀  \[email protected]\h\W$ "

What's yours?

Fontawesome icons inside a palaceholder

This is one way to use fontawesome icons inside a palaceholder:

in the CSS you have to use this code for the class fontAwesome:

.fontAwesome {
font-family: 'Helvetica', FontAwesome, sans-serif;

After that in the HTML you have to add the **fontawesome class** first and then the **fontawesome icon code** inside the placeholder:

<input class="fontAwesome" name="emailAddress" type="text" placeholder="[insert-fa-code-here;] insert email address ..." />

and it's done!!!

You can simply apply the class every time inside your input with the relative code in the placeholder.

And even more, you can use this method by entering the code into a generic element such as a link or a simple text using the same class "fontAwesome" used for the placeholder:

<a class="fontAwesome" href="#">[insert-fa-code-here;] Great job!!!</a>

You can see the result or read the post from my codePen post.

See the Pen FontAwesome and placeholders by Massimiliano Ranauro (@huckbit) on CodePen.

atom: first configuration and install

Recommended packages.

You can't miss this packages in your atom ide configuration:

  • Emmet: to improve HTML and CSS work flow. | more info.
  • Sublime Style Column Selection: you can use the feature for vertical selection with alt - click - drag inside atom like in sublime text.
  • atom ternjs: this plugin give to you intellisense for JavaScrip. This need activatio in the properties plugin forn working.
  • file-icons: the icons for the left sidebar, I love this (really cool).
  • atom-preview-html: you can have a little browser simply pressing CTRL + SHIFT + M | package-info.
  • open-in-browser: open html in your browser | package-info.
  • minimap: a preview of the full source code sublime style | package-info.
  • pigments: a package to display colors in project and files | package-info.

Some Keyboard shortcuts

CMD - \ show/hide three
CMD - D select same items inside the document
CTRL - W text wrap html
CMD - L select line
CRTL - M parent parenthesis check
CRTL - CMD - M select code inside parenthesis

bootstrap: change tooltip color

To change tooltip color in bootstrap add to your wrap the class "red-tooltip" (red can be another colors, simply change the color code in your css) and then add this code to the css file:

.red-tooltip + .tooltip > .tooltip-inner {background-color: #f00;}
.red-tooltip + .tooltip > .tooltip-arrow {border-bottom-color:#f00; }

You have to change border-bottom with "right" if you want use right view or "left" in you want use left view or top for top view

css: using the @font-face directive

The secret to web fonts is a CSS command called the @font-face directive.

This command at its most basic names the font and tells the browser where to find the
font file for download.

You place the @font-face directive in your style sheet, just like a regular style.

For example, say you’re using the League Gothic font. You have a True Type file named League_Gothic-webfont.ttf inside a fonts folder on your site.

You’d instruct a browser to download this font by adding the @font-face directive to your style sheet like this:

@font-face {
font-family: "League Gothic";
src: url('../fonts/League_Gothic-webfont.ttf');

The first property, font-family, you’ve seen before (page 127), but here it has a different purpose. When used inside an @font-face directive, font-family assigns a
name to the font.

When used inside an @font-face directive, font-family assigns a
name to the font.

For example, say you want to use the League Gothic font for all paragraphs
on a page. You could then use this style:

p {
font-family: "League Gothic";

WP: link favicon in the theme

If there is already an old favicon.ico file in your current theme’s main folder, delete it using FTP Clients.

With an FTP Client, upload the new favicon.ico file into your current theme’s main folder.

Upload another copy of your favicon.ico file to the main directory of your site (ie. This will display the favicon in your subscribers’ feedreaders.

In order for your favicon to show up in some older browsers, you will need to edit your page header. Remember, the best way to edit your theme's files is via a Child Theme. For the purpose of the following instructions you will need to create a copy of your parent theme's header.php file in your child theme.

Go to your WordPress Administration Panel.

  1. Click on Appearance.
  2. Click on Theme Editor.
  3. Select the file called Header or header.php to edit the file.
  4. Search for the line of code that begins with
    <link rel="shortcut icon" and ends with /favicon.ico" />

    Overwrite it, if it exists, or add the following the same code below the <head> HTML tag.

more [email protected] WPcodex: Creating a Favicon

How to set a partylist with javascript

Party List :

  • Party List is a data type in CRM, using which you can set more than one records of an entity for a single field.
  • Party List type field, renders as Lookup on the form, but it works as multi select lookup.
  • We can’t create a custom party list fields.

Function to set  Call To in a Phone Call Activity (tested on CRM 2015 Update 1 Online):

function setCallTo() {
    var callTo = getAttr("to"); //Party list to set

    var callToArry = new Array(); 
    callToArry[0] = new Object(); 

    callToArry[0].id = getLkpId("new_calltocontact");
    callToArry[0].name = getLkpName("new_calltocontact");
    callToArry[0].entityType = "contact";

function getAttr(attributeId) {
    return Xrm.Page.getAttribute(attributeId);
function getVal(attributeId) {
    try {
        return Xrm.Page.getAttribute(attributeId).getValue();
    catch (e) {
        alert("getVal: Error for attribute " + attributeId);
function getLkpName(attributeId) {
    return getVal(attributeId)[0].name;
function getLkpId(attributeId) {
    return getVal(attributeId)[0].id;

sudoers grant

For grant sudoers to user in redhat, centos, oralce linux, edit the file /etc/sudoers and append
username ALL=(ALL) ALL
root ALL=(ALL) ALL

For example:

## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##     user    MACHINE=COMMANDS
## The COMMANDS section may have other options added to it.
## Allow root to run any commands anywhere

root    ALL=(ALL)     ALL
oracle    ALL=(ALL)     ALL