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

JS – DOMContentLoaded

Si utilizza DOMContentLoaded quando si ha necessità di caricare completamente tutta la pagina prima di visualizzarla. Si utilizza al posto dell’istruzione: window.onload

<script>
  document.addEventListener("DOMContentLoaded", function(event) {
    console.log("DOM fully loaded and parsed");
  });
</script>

Maggiori info nella: reference

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. http://example.com/favicon.ico). 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

sudoers grant

For grant sudoers to user in redhat, centos, oralce linux, edit the file /etc/sudoers and append
username ALL=(ALL) ALL
under
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

less command

The navigation keys in less command are similar to Vim editor.

Forward Search

    / – search for a pattern which will take you to the next occurrence.
    n – for next match in forward
    N – for previous match in backward

Backward Search

    ? – search for a pattern which will take you to the previous occurrence.
    n – for next match in backward direction
    N – for previous match in forward direction

For viewing large log files

    CTRL+F – forward one window
    CTRL+B – backward one window
    CTRL+D – forward half window
    CTRL+U – backward half window
    j – navigate forward by one line
    k – navigate backward by one line
    G – go to the end of file
    g – go to the start of file
    q or ZZ – exit the less pager

Useful other command

    v – using the configured editor edit the current file.
    h – summary of less commands
    &pattern – display only the matching lines, not all.

File paging
You can open multiple files by passing the file names as arguments:

$ less file1 file2