Skip to content

Instantly share code, notes, and snippets.

View maxime's full-sized avatar

Maxime Guilbot maxime

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1KfL4urUz1WYjVYeJLo4N891gyTiBuAWGh https://explorer.blockstack.org/address/1KfL4urUz1WYjVYeJLo4N891gyTiBuAWGh
@maxime
maxime / faiss_install_notes_on_high_sierra.md
Last active April 13, 2023 18:49
Install Facebook FAISS on macOS High Sierra

Those instructions are working for me as of January 2017, 2018. Using Homebrew and maOS 10.13.2

Install xCode command line tools (if you don't have it already)

xcode-select --install

Install LLVM

@maxime
maxime / find_missing_translations.rake
Created November 12, 2009 03:52
short script that finds and reports missing translation keys
require "yaml"
desc "Find missing translations"
task :find_missing_translations do
base_locale = 'en'
locale_to_translate_in = 'zh-CN'
english_texts = YAML::load(File.read(File.join(RAILS_ROOT, 'config', 'locales', base_locale+".yml")))
translations = YAML::load(File.read(File.join(RAILS_ROOT, 'config', 'locales', locale_to_translate_in+".yml")))
user www-data www-data;
worker_processes 1;
error_log logs/error.log;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
desc 'Run specifications'
Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
t.spec_files = Pathname.glob((ROOT + 'spec/**/*_spec.rb').to_s)
begin
t.rcov = ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true
t.rcov_opts << "--exclude 'config,spec,#{Gem::path.join(',')}'"
t.rcov_opts << '--text-summary'
t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
#
# In my router, I have:
#
resources :companies do
collection :do_something, :method => :post
end
#
# The match(request) method after compilation is: