• About
  • Bookmarks
  • RSS

Rick's code

HTML, CSS and 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
May 30, 2016 by Rick

Clean characters from input type number – Angular

Use a custom Angular directive to clean an input field to allow only number…

Posted in JavaScript
Tagged AngularJS
Clean characters from input type number – Angular
April 5, 2016 by Rick

Trigger after ng-repeat has finished – Angular

Fire an event after the ng-repeat has finished in Angular. If you need to trigger a third party jQuery plugin or anything for that matter…

Posted in JavaScript
Tagged AngularJS
Trigger after ng-repeat has finished – Angular
March 23, 2016 by Rick

How to make Angular work with Jinja templates

Use Angular template with curly braces inside Jinja templates…

Posted in JavaScript
Tagged AngularJS
How to make Angular work with Jinja templates
March 18, 2016 by Rick

How to look for string inside files in Ubuntu terminal

Use this command to search strings inside files using the terminal in an Ubuntu instance…

Posted in Linux
Tagged Ubuntu
How to look for string inside files in Ubuntu terminal
January 22, 2016 by Rick

Easy Background Image Slideshow

Create a simple background slide transition that will work great in all modern browsers…

Posted in CSS
Tagged jQuery
Easy Background Image Slideshow
« Previous
Next »

Categories

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

RSS Ricard Torres Blog

  • Week 7 (2019)
  • Amazon Prime Video can’t use Google’s Chromecast
  • For an 85€ mouse, you would expect excellence
  • Saying goodbye to Google Inbox
  • Do you have a channel?
  • Should we treat software as people?
  • Too much snow? Apparently
  • The black hole called Netflix
  • Don’t call an ambulance
  • Thinking about 2019 goals

Sharing code since 2010

@ricard_dev

@ricard_dev@mastodon.social

4.728.236 post views so far. This page needed 49 queries to load.

© Rick's Code - 2019