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
#! /usr/bin/env ruby | |
# NOTE: Requires Ruby 2.1 or greater. | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It prints all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created |
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 'json' | |
require 'pp' | |
Query = Struct.new(:attributes, :conditions) | |
Condition = Struct.new(:query, :operator, :arg) | |
class Parser | |
attr_reader :query |
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
module MassInsertUniq | |
extend ActiveSupport::Concern | |
included do | |
include PluckHash | |
end | |
module ClassMethods | |
def mass_insert_uniq(attributes, insert_scope: -> { self }) | |
return if attributes.blank? |
- PHP - http://php.net/docs.php
- JavaScript - https://developer.mozilla.org/en-US/docs/Web/JavaScript
- Python - https://www.python.org/doc/versions/ ( escolha a versão ).
- Java - http://docs.oracle.com/javase/7/docs/api/
- Ruby - http://ruby-doc.org/
- Perl - http://www.perl.org/docs.html
- C/C++ - http://en.cppreference.com/w/
- Haskell - http://www.haskell.org/haddock/doc/html/index.html
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
packages: | |
yum: | |
gcc-c++: [] | |
make: [] | |
sources: | |
/home/ec2-user: http://download.redis.io/releases/redis-2.8.4.tar.gz | |
commands: | |
redis_build: | |
command: make | |
cwd: /home/ec2-user/redis-2.8.4 |
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 'nokogiri' | |
require 'csv' | |
kml_path = '/path/to/Google Drive/My Tracks/' | |
def kml_file_paths path | |
Dir.glob(path + "*.kml") | |
end | |
csv = CSV.open('mytracks.csv', "wb") |