Skip to content

Instantly share code, notes, and snippets.

View carlosrenatohr's full-sized avatar
💭
I may be slow to respond.

Carlos Hernandez carlosrenatohr

💭
I may be slow to respond.
  • Managua, Nicaragua
View GitHub Profile
@carlosrenatohr
carlosrenatohr / digitalClock
Created June 7, 2015 05:07
Digital clock js
function updateClock ( )
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );
// Pad the minutes and seconds with leading zeros, if required
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
// Choose either "AM" or "PM" as appropriate
@carlosrenatohr
carlosrenatohr / upload_helper
Created April 15, 2015 17:38
Function to create thumbnail images with php
function createThumb($rawname, $ext, $path)
{
$custom_width = 200;
$type = str_replace('.', '', $ext);
$filename = $rawname . $ext;
$mini_filename = $rawname . '_mini' . $ext;
$file_path = $path . $filename;
// Build new image
if ($type == 'jpeg' || $type == 'jpg') {
$thumb = imagecreatefromjpeg($file_path);
@carlosrenatohr
carlosrenatohr / post.md
Last active August 29, 2015 14:15 — forked from kbond/post.md

Install git:

sudo apt-get install git

Configure Git:

touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"

git config --global user.email "Your Email"

@carlosrenatohr
carlosrenatohr / linksrb
Last active August 29, 2015 14:13
Ruby-learn
http://awesome-ruby.com/
http://www.theodinproject.com/
https://rubyoffrails.com/
https://www.railstutorial.org/book
http://codehero.co/series/ruby-on-rails-desde-cero/
rubyforwebdesigners.com
https://github.com/bbatsov/ruby-style-guide
http://readwrite.com/2011/04/08/10-free-e-books-on-ruby-for-be
http://resrc.io/list/10/list-of-free-programming-books/#ruby
@carlosrenatohr
carlosrenatohr / links
Last active November 25, 2016 05:05
Recopilation of top developing links