Skip to content

Instantly share code, notes, and snippets.

View rderoldan1's full-sized avatar
🇨🇴

Ruben Espinosa rderoldan1

🇨🇴
  • Medellin, Colombia
View GitHub Profile
//Un banco ha solicitado se diseñe un programa que permita encriptar la información de las
//contraseñas (4 números) digitada por teclado (como un único numero) hasta el servidor
//principal, utilizando el siguiente criterio, el primer número se envía de último, el segundo,
//de penúltimo, el tercer numero pasa a la segunda posición, el último pasa a ser primero:
//ejemplo: Sea 6532, se debe enviar como 2356
using System;
using System.Linq;
public class Program
Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
Maven home: /usr/share/maven
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: US-ASCII
OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /Users/rubenespinosa/.m2/settings.xml
[DEBUG] Using local repository at /Users/rubenespinosa/.m2/repository
@rderoldan1
rderoldan1 / README.md
Created August 26, 2014 18:02
How to increase AWS Disk

How to increase AWS Disk

  • Log into the AWS Management Console
  • Make sure that the Instance that you wish to change is not currently running
  • Navigate to Elastic Block Store > Volumes
  • Check the box next to the Volume that needs more space
  • Click the More… drop down list and select Create Snapshot
  • Enter a Name and a Description
  • Navigate to Elastic Block Store> Snapshots
$(document).on "page:change", ->
chat = new Chat()
socket = chat.socket
socket.onopen = ->
chat.send('user_new', 'Se ha conectado')
chat.send('list', '')
#socket.send('{"event":"user_message", "data": {"username": "'+username+'", "message": "oeoeo"}}')
socket.onmessage = (evt) ->
chat.parse_response(evt)
@rderoldan1
rderoldan1 / application_helper.rb
Last active August 29, 2015 13:57
Example of search methods in Postgresql
# app/helpers/application_helper.rb
module ApplicationHelper
# Search form tag, render html form for bootstrap 3
# params
# - path, url of controller action: clients_path
# - placeholder text: 'Search by Name or Nickname'
# Return
# HTML safe string
def search_form(path, placeholder)
form_tag path, class: "well", :method => 'get' do
@rderoldan1
rderoldan1 / formula.java
Last active January 2, 2016 17:19
Cambio en formulas de Reportes Vcenter
/*
* Formula Memoria
*/
row.createCell(8).setCellFormula("(100-I1-G"+(inicial+1)+")%*C"+(inicial +1));
/*
* Formula Procesador
*/
row.createCell(7).setCellFormula("(100-I1-F"+(inicial+1)+")%*B"+(inicial +1));
@rderoldan1
rderoldan1 / README.md
Created December 13, 2013 16:03
Ignore file changes in git

Fortunately GIT has a very easy solution for this, just run the following command on the file or path you want to ignore the changes of:

git update-index --assume-unchanged <file>

If you wanna start tracking changes again run the following command:

git update-index --no-assume-unchanged <file>

source: http://blog.pagebakers.nl/2009/01/29/git-ignoring-changes-in-tracked-files/

@rderoldan1
rderoldan1 / gist:7363635
Created November 7, 2013 23:24
ejemplo
clase Jugador
edad = 0
goles = 0
nacimiento = 0000-00-00
posicion = ""
valor = 0
inicializador(edad, goles, nacimiento, posicion)
edad = edad
@rderoldan1
rderoldan1 / 0_reuse_code.js
Created November 7, 2013 15:35
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
@rderoldan1
rderoldan1 / _partial.html.erb
Created September 24, 2013 13:29
PDF Rendering using partials
<h5>Mi partial content</h5>
<%= @object.some_attribute %>