• About
  • Bookmarks
  • RSS

Rick's code

HTML, CSS and JavaScript

March 10, 2018 by Rick

New design is now live!

I’ve created a new WordPress Theme for Rick’s code using Bootstrap 4. It is now live, check it out…

Posted in WordPress
New design is now live!
February 14, 2018 by Rick

Find URL’s in string and convert them to links – JavaScript

If you need to find the url’s in a string and convert them to HTML link elements using JavaScript, feel free to take this handy regex expression…

Posted in JavaScript
Find URL’s in string and convert them to links – JavaScript
February 13, 2018 by Rick

Atom TypeScript linting in .js files

Use TypeScript liniting in JavaScript files (.js) without changing the file extension with Atom IDE…

Posted in JavaScript
Tagged Atom, TypeScript
Atom TypeScript linting in .js files
September 27, 2017 by Rick

Start a local http server with Python

You can spawn a simple http server in your localhost with a single line using Python from your command line…

Posted in Other
Start a local http server with Python
August 17, 2017 by Rick

Separate string in groups of 4 in JavaScript

This magic regex will separate a string into groups of 4 characters (or less if in the end the group is smaller)…

Posted in JavaScript
Separate string in groups of 4 in JavaScript
June 28, 2017 by Rick

Yet another regex for email validation

Here’s a nice little regular expression for checking valid emails. There are dozens of email validations out there, this is just another one…

Posted in JavaScript
Yet another regex for email validation
April 12, 2017 by Rick

Remove all characters but digits from string – JavaScript

The following regular expression will match for a single character not present in the range between 0 (ASCII 48) and 9 (ASCII 57) (case sensitive)…

Posted in JavaScript
Remove all characters but digits from string – JavaScript
February 14, 2017 by Rick

How to lose focus on input field with JavaScript

Specially useful when you’re on mobile and need to hide the phone keyboard…

Posted in JavaScript
How to lose focus on input field with JavaScript
November 3, 2016 by Rick

Create lock screen alias in Mac terminal

Add a terminal command to lock the screen in Mac, add it to your bash_profile to it will be after restarting your computer…

Posted in Mac
Create lock screen alias in Mac terminal
June 3, 2016 by Rick

Debounce Window resize callbacks in JavaScript

Use a debounce function when listening to a window resize event in JavaScript otherwise you’ll site be very slow, bad UX or even crash the browser…

Posted in JavaScript
Debounce Window resize callbacks in JavaScript
« Previous

Categories

  • Apache (7)
  • bbPress (4)
  • CodeIgniter (5)
  • CSS (40)
  • HTML5 (17)
  • JavaScript (52)
  • Linux (21)
  • Mac (7)
  • Magento (52)
  • MySQL (4)
  • News (19)
  • Node.js (4)
  • Other (21)
  • PHP (19)
  • WordPress (102)

RSS Ricard Torres Blog

  • I can't delete Facebook
  • We should be nice to our AI's
  • Dentists, ugh
  • When you're a web developer
  • Suits has been renewed for an 8th season
  • Review: Columbus Day: Expeditionary Force
  • Google knows
  • Review: Stranger Things 2
  • Review: Limitless Season 1
  • Twitter, Facebook or a blog post

Sharing code since 2010

@ricard_dev

4.371.276 post views so far. This page needed 43 queries to load.

© Rick's Code - 2018