Example of how to scrape data using Mechanize.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.codewars.com/kata/the-builder-of-things/ruby | |
# https://www.codewars.com/kata/reviews/5571e09a385f59d95f000063/groups/59426d64e6049310a70006ce | |
# imported to handle any plural/singular conversions | |
require 'active_support/core_ext/string' | |
class Thing | |
def initialize(name) | |
@properties = {} | |
is_the.name.send(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Be careful not to confuse chomp with the chop method. The chop method will simply knock off the last character of the | |
#string, no matter what it is | |
"hello\n".chomp | |
#=> "hello" | |
"hello".chomp | |
#=> "hello" | |
"hello".chop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS words ( | |
word text | |
); | |
CREATE TABLE IF NOT EXISTS product ( | |
product_id int not null, | |
name text not null, | |
description text not null, | |
price decimal(12,2), | |
attributes jsonb, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
sudo update-alternatives --config java | |
// actualizar JAVA_HOME y PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/opt/lampp/./lampp restart | |
rm -fr /var/run/mysqld | |
mkdir -p /var/run/mysqld | |
ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Preferences key bindings user | |
[ | |
{ "keys": ["ctrl+1"], "command": "reindent", "args": {"single_line": false}}, | |
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } }, | |
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } } | |
] | |
// Preferences settings user | |
{ | |
"font_size": 16, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
es-MX: | |
admin: | |
actions: | |
import: | |
title: Importar | |
menu: Importar | |
breadcrumb: Importar | |
link: Importar | |
bulk_link: Importar | |
done: Importado |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
es: | |
views: | |
pagination: | |
first: "« Primero" | |
last: "Último »" | |
previous: "‹ Ant" | |
next: "Sig ›" | |
truncate: "…" | |
helpers: | |
page_entries_info: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# space_invaders.rb: | |
# A game as Space Invaders using Gosu and Ruby. | |
# | |
# Authors: | |
# (c) 2014 Masafumi Yokoyama | |
# | |
# License: | |
# This program is licensed under the MIT License. | |
# |
NewerOlder