Skip to content

Instantly share code, notes, and snippets.

View rderoldan1's full-sized avatar
🇨🇴

Ruben Espinosa rderoldan1

🇨🇴
  • Medellin, Colombia
View GitHub Profile
@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
$(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 / 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
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
//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