Skip to content

Instantly share code, notes, and snippets.

View nachoal's full-sized avatar
:shipit:
Shipping 🚢

Ignacio Alonso nachoal

:shipit:
Shipping 🚢
View GitHub Profile
javascript:
i = 0;
minutos = 4; // cambia esto de acuerdo al tiempo que quieras
cuenta = minutos * 60;
function autoScroll()
{
if (i < cuenta)
{
javascript:
var data="";
e=document.getElementsByClassName("FriendRequestOutgoing");
for(var i=0; i<e.length; i++)
{
v=e[i].getAttribute("data-profileid");
if(v) data+=v+"\n"
}
@nachoal
nachoal / twitterFollow
Created March 21, 2015 14:42
Script para seguir automáticamente a todas las cuentas de twitter en una pantalla
javascript:
var inputs = document.getElementsByClassName('button-text follow-text');
for(var i=0; i<inputs.length;i++) {
inputs[i].click(); }
@nachoal
nachoal / largestNumberCalc
Created June 1, 2015 07:11
Given 3 numbers add up their individual digits and return the largest summed one
function largestPhoneCalculator(pn1, pn2, pn3) {
var aPhoneNumber = [];
var stringNumber = pn1.toString();
for (var i = 0, lngt = stringNumber.length; i < lngt; i++) {
aPhoneNumber.push(+stringNumber.charAt(i));
}
for (var i = 0, sum = 0; i < aPhoneNumber.length; sum += aPhoneNumber[i++]);
//console.log(sum);
//For unfollowing
var inputs = document.getElementsByClassName('icon icon-button-unfollow pointer action-button');
for(var i=0; i<inputs.length;i++) {
inputs[i].click(); }
//For following
var inputs = document.getElementsByClassName('icon icon-button-follow pointer action-button');
for(var i=0; i<inputs.length;i++) {
inputs[i].click(); }
require 'mail'
require 'csv'
password = 'AQUI TU CONTRASEÑA'
user = "AQUI TU CORREO (gmail)"
csv_options = { col_sep: ',', quote_char: '"', headers: :first_row }
filepath = 'correos.csv'
options = {
address: 'smtp.gmail.com',
port: 587,
user_name: user,
@nachoal
nachoal / rails_new_help_output.md
Created November 4, 2019 03:04 — forked from eliotsykes/rails_new_help_output.md
"rails new" options explained

Run rails new --help to view all of the options you can pass to rails new:

$ bin/rails new --help
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
                                                         # Default: /Users/eliot/.rbenv/versions/2.2.0/bin/ruby

Learning Programming in the post-Wagon blues

The most general and important advice I can give you is: build things. If you're practicing by yourself, find a problem you want to solve. Be it a page component you're interested in (a navbar that hides on a threshold) or an entire, but simple, app (a downscaled Evernote clone), it's important to have clear goals and to be able to see the results of your work.

Courses

I'll suggest only one thing here...:

@nachoal
nachoal / get_a_job.md
Created July 8, 2020 20:02
Presentation
title tags description
How to get a job after a coding bootcamp
Talk, jobs, development
What to do to get a job after a coding bootcamp

How to get a job after a coding bootcamp!

Tips and tricks

@nachoal
nachoal / template_test.rb
Last active February 19, 2021 16:38
a test for a rails template
# Kill spring if its running
run "if uname | grep -q 'Darwin'; then pgrep spring | xargs kill -9; fi"
#################################### GEMFILE ###################################
gsub_file './Gemfile', /(^ $|# .+$)/, ''
gsub_file './Gemfile', /^\n/, ''
gsub_file './Gemfile', /^ $/, ''
gsub_file './Gemfile', /^\n/, ''
gsub_file './Gemfile', /^ruby.+$/, "\nruby '#{RUBY_VERSION}'"
gsub_file './Gemfile', /^gem 'rails'.+$/, "\n# Base\ngem 'rails', '~> #{Rails.version}'"