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 / links
Last active November 25, 2016 05:05
Recopilation of top developing links
@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 / 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 / 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 / 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 / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@carlosrenatohr
carlosrenatohr / rails_resources.md
Last active August 29, 2015 14:24 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@carlosrenatohr
carlosrenatohr / gist:1bf6eeb8d47b4ed7a403a8b02cb2f1a5
Created August 1, 2016 04:29 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@carlosrenatohr
carlosrenatohr / README-Template.md
Created November 2, 2016 16:50 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites