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
// http://www.climatempo.com.br/brasil | |
var tables = jQuery(".columns table.medium-6"); | |
var getTableData = function(table) { | |
return jQuery.map(table.find('tbody > tr'), function(element, index) { | |
var _element = jQuery(element); | |
var scope = _element.find('td'); | |
var city_name = scope.find('a.txt-blue').text(), | |
minimum = scope.find('span.txt-black').first().text(), |
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
require 'active_record' | |
require 'pry' | |
class BaseClass | |
def self.model(&block) | |
@model ||= Class.new(ActiveRecord::Base, &block) | |
end | |
def initialize(options = {}) | |
establish_database_connection |
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
#!/bin/bash | |
# | |
# DROPKICK.SH | |
# | |
# Detect and Disconnect the DropCam and Withings devices some people are using to | |
# spy on guests in their home, especially in AirBnB rentals. Based on Glasshole.sh: | |
# | |
# http://julianoliver.com/output/log_2014-05-30_20-52 | |
# | |
# This script was named by Adam Harvey (http://ahprojects.com), who also |
Of course I will start this list with one debut album, this self-titled album by SBTRKT(pronounced as "Subtract") is a masterpiece!!!!
A wonderful reunion of great collaborators, most of the songs has Sampa contrib in vocal, when you hear the voice of this guy for the first time, you find yourself addicted to it!
Theres a track called Ready Set Loop
, I always read as Read Eval Print Loop
(REPL - that kind of interactive shell you have in your programming language, such as irb, node, python, php)
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
require './documents/base' | |
require './documents/cpf' | |
require './documents/cnpj' | |
module BRDocuments | |
VERSION = '0.0.1' | |
end |
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
require 'pry' | |
require 'json' | |
require 'uri' | |
module Application | |
class NginxLogParser | |
DEFAULT_FORMAT_REGEXP = /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s?\-\s?-\s?\[(\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|\-)\d{4})\]\s?\\?"?(GET|POST|PUT|HEAD|DELETE|OPTIONS)\s?(.*?)\s(HTTP\/\d\.\d)\\?"?\s?(\d{3})\s?(\d+)\s?\\?\"\-\\?\"\s?\\?\"(.*?)\"/i | |
REQUEST_FORMAT = [ |
https://devcenter.heroku.com/articles/custom-domains http://thenomadicfreelancer.blogspot.com/2012/08/pointing-godaddy-domain-to-your-heroku.html
For each custom subdomain use domains:add
in the Terminal.
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
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
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
require 'openssl' | |
def gen_key(name) | |
key = OpenSSL::PKey::RSA.new 1048 | |
file = File.new(name, "w") | |
file.write(key) | |
file.close | |
end | |
def get_key(name) |