Skip to content

Instantly share code, notes, and snippets.

View FloorD's full-sized avatar

Floor Drees FloorD

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
@wikimatze
wikimatze / gist:9648491
Last active August 29, 2015 13:57
Deploy Padrino Apps On Anynines

Let's create a new application:

$ padrino g project hello-world-anynines-mysql -d activerecord -a mysql
    create
    create  .gitignore
    create  config.ru
    create  config/apps.rb
    create  config/boot.rb
@pa7
pa7 / gist:8821494
Created February 5, 2014 11:18
Kod.io Linz
(function(e){ return String.fromCharCode.apply(String, e.reverse()); })([9829, 32, 9829, 32, 9829, 32, 111, 115, 108, 97, 32, 33, 98, 101, 119, 32, 110, 114, 101, 100, 111, 109, 32, 101, 104, 116, 32, 116, 117, 111, 98, 97, 32, 115, 107, 108, 97, 116, 32, 101, 109, 111, 115, 101, 119, 97, 32, 101, 104, 116, 32, 108, 108, 97, 32, 102, 111, 32, 101, 115, 117, 97, 99, 101, 98, 32, 111, 105, 46, 100, 111, 107, 32, 111, 116, 32, 111, 103, 32, 111, 116, 32, 101, 118, 111, 108, 32, 100, 39, 73]);
@johannesnagl
johannesnagl / kitickety.txt
Created February 5, 2014 11:12
why i should get a linz.kod.io ticket for free?
|\_/|
(. .)
=w= (\
/ ^ \//
(|| ||)
,""_""_ .
because we all love cats! and i would totally love to hear from one of the @github-octocats about their success stories!
@jvns
jvns / interview-questions.md
Last active May 14, 2024 18:47
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@tarcieri
tarcieri / gist:5483325
Last active December 16, 2015 19:10
The DHH Drinking Game

The @dhh Drinking Game

Take a drink whenever @dhh:

  1. Drops the f-bomb (or says "shit")
  2. Makes fun of Java (or Struts, Hibernate, etc)
  3. Mentions "frameworks should be extractions, not inventions"
  4. Mentions "constraints are liberating"
  5. Defends TurboLinks or the asset pipeline
  6. Mentions Basecamp
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active May 16, 2024 16:51
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh