Skip to content

Instantly share code, notes, and snippets.

View GusGA's full-sized avatar
🕶️
Reading someone else's code

Gustavo Giménez GusGA

🕶️
Reading someone else's code
  • Santiago, Chile
View GitHub Profile
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@GusGA
GusGA / rpi.md
Created April 21, 2014 06:40 — forked from thpani/rpi.md

Raspberry Pi setup routine

Headless boot to SSH over WiFi

/etc/network/interfaces

auto lo
auto eth0

allow-hotplug wlan0

@GusGA
GusGA / script.rb
Last active August 29, 2015 14:01
nedilio code
@textfile = ARGV.first
#Mi codigo bonito
def read_file_and_write_pairs(filename)
read_file = File.open(Dir.glob(File.join("**",filename)).first, 'r' )
temp_file = File.open("temp.txt", 'w' )
cdp_string = ""
read_file.readlines.each do |line|
#si linea tiene CDP guardar variable (no se como guardar en una variable que pueda usar luego)
#dentro de la iteracion declaras dos variables
@GusGA
GusGA / stack_o_1.rb
Created June 27, 2014 17:00
the exercise's solution to the problem proposed by Moblox.io
#Implement in constant time, i.e. O(1), the following operations: push, pop, retrieve the minimum element.
class Stack
attr_accessor :queue
def initialize
@queue = []
@min = []
end
def push e
@queue.push(e)
@GusGA
GusGA / prawn.md
Created July 1, 2014 15:01
Article writed by Someone about Prawn gem and rails

##CREATING PDF USING PRAWN IN ROR

Recently i was working on a client project and i realized that i need to create a PDF for generating a invoice on the fly. I wanted something

As i started searching my way for options, i found out that there are lot of gems and plugins available in the rails community for generating PDF.

There were two options for me which were widely used for generating PDF.

@GusGA
GusGA / ejercicio_uno_dos.c
Last active August 29, 2015 14:03
Ejercicios del trabajo de recuperación de Prog I - IUGT
// main.c
// ejercicio_uno_dos
//
// Created by Gustavo Gimenez on 7/8/14.
// Copyright (c) 2014 Gustavo Gimenez. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@GusGA
GusGA / Quiz.md
Last active August 29, 2015 14:04
Posible quiz para el 15/7/14

#Quiz

Al 15 / 7 / 14

La compañia Cars fabrica tres modelos de vehículos:

  • Rapid
  • Audax
  • Supersonic

Diariamente produce 500 turismos Rapid de lujo L y 350 del tipo normal N. Asimismo, fabrica 400 L y 250 N de su modelo Audax y 300 L y 550 N de su modelo Supersonic.

@GusGA
GusGA / help.md
Last active August 29, 2015 14:05

###It could just be your system management controller. Try resetting it using the following procedure: ##Resetting the System Management Controller (SMC) Note: Portable computers that have a battery you should not remove on your own include MacBook Pro (Early 2009) and later, all models of MacBook Air, and MacBook (Late 2009).

  • Shut down the computer.
  • Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
  • On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
  • Release all the keys and the power button at the same time.
  • Press the power button to turn on the computer.
    Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.
@GusGA
GusGA / numbers_euler_13.csv
Last active August 29, 2015 14:05
CSV List of One Hundred 50-digits numbers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
74324986199524741059474233309513058123726617309629
91942213363574161572522430563301811072406154908250
23067588207539346171171980310421047513778063246676
89261670696623633820136378418383684178734361726757
28112879812849979408065481931592621691275889832738
44274228917432520321923589422876796487670272189318
47451445736001306439091167216856844588711603153276
70386486105843025439939619828917593665686757934951