Skip to content

Instantly share code, notes, and snippets.

View dergachev's full-sized avatar

Alex Dergachev dergachev

View GitHub Profile
@otobrglez
otobrglez / jaccard_recommendation.rb
Last active April 2, 2024 17:51
Simple recommendation system written in Ruby based on Jaccard index.
# Simple Recommendation Engine in Ruby
# Visit: http://otobrglez.opalab.com
# Author: Oto Brglez <otobrglez@gmail.com>
class Book < Struct.new(:title)
def words
@words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort
end
@amirkdv
amirkdv / mechanic.rb
Last active August 29, 2015 14:02
Login, click through, and get the data you need from an HTTPS site
#!/usr/bin/env ruby
# Use Mechanize to automatically login, click through, and fetch the data you
# need from an HTTPS site. The following works for the McGill admission portal.
# ruby mechanic.rb
# # Ready for Review
# # Ready for Review
require 'rubygems'
require 'mechanize'
@RichardBronosky
RichardBronosky / multiple_ssh_setting.md
Last active June 5, 2024 19:16 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"

After running homesick clone dotfiles ...

E492: Not an editor command: Plugin 'gmarik/Vundle.vim'
line   96:
E492: Not an editor command: Plugin 'gmarik/vundle'
line   97:
E492: Not an editor command: Plugin 'kana/vim-fakeclip'
line   98:
E492: Not an editor command: Plugin 'jtratner/vim-flavored-markdown'
@levelsio
levelsio / btc-eth-dca-buy.php
Last active January 6, 2023 22:04
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
<?
//
// [ BUY BTC & ETH DAILY ON BITSTAMP ]
// by @levelsio
//
// 2017-08-23
//
// 1) buy $40/day BTC
// 2) buy $10/day ETH
//