Input | OldSlug | Unislug | Unislug HTML link | Unislug appearance in location bar |
---|---|---|---|---|
[[Peña]] |
pea |
peña |
/pe%C3%B1a.html |
/peña.html |
[[Pea]] |
pea |
pea |
/pea.html |
/pea.html |
[[RAMN]] |
ramn |
ramn |
/ramn.html |
/ramn.html |
[[Ramén]] |
ramn |
ramén |
/ram%C3%A9n.html |
/ramén.html |
[[Ramón]] |
ramn |
ramón |
/ram%C3%B3n.html |
/ramón.html |
[[Гильдии]] |
(empty string) | гильдии |
/%D0%B3%D0%B8%D0%BB%D1%8C%D0%B4%D0%B8%D0%B8.html |
/гильдии.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
#!/usr/bin/env bash | |
zenity --password & | |
zenity_pid=$! | |
osascript<<EOF | |
tell application "System Events" | |
set processList to every process whose unix id is $zenity_pid | |
repeat with proc in processList | |
set the frontmost of proc to true | |
end repeat |
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
irb(main):001:0> module Mixin; end | |
=> nil | |
irb(main):002:0> class A | |
irb(main):003:1> include Mixin | |
irb(main):004:1> end | |
=> A | |
irb(main):005:0> a = A.new | |
=> #<A:0x007fbaea8a89a8> | |
irb(main):006:0> a.is_a? Mixin | |
=> true |
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
class FlattenEnum | |
class << self | |
# Returns an enumerator that yields the non-enumerable items from within a | |
# nested enumerable, in depth-first order. | |
# | |
# Example: | |
# | |
# FlattenEnum.create([[1, 2, [3]], 4]).to_a | |
# #=> [1, 2, 3, 4] |
We want to demonstrate how easy it is to model a domain as a graph and answer questions in almost natural language.
Graph Based Search and Discovery is prominent a use-case for graph databases like Neo4j.
I hereby claim:
- I am replaid on github.
- I am rep (https://keybase.io/rep) on keybase.
- I have a public key ASCQqLi-yHok4PIouZjkILaJ5jUFRMrj__Ebwe-uaqpKJwo
To claim this, I am signing this object:
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 'domain' | |
require 'persist/rom' | |
require 'persist/users_relation' | |
rom = ROM.env | |
p rom | |
Domain::Repository::User.delegate = rom.relation(:users).as(:user) |
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
components/ | |
my_bounded_context/ | |
app/ | |
presentation/ # This is called the "UI" layer in DDD literature, but it is also | |
# where things like JSON interfaces live -- any kind of presentation | |
# or handshake to anything outside. So "presentation" rather than "ui". | |
assets/ | |
helpers/ | |
mailers/ | |
views/ |
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
ActiveRecord::Base.connection.tables.each do |table_name| | |
ActiveRecord::Base.connection.execute("select * from #{table_name} into outfile '/tmp/datadump-#{table_name}.outfile'") | |
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
# Adapted for Rails 4 from http://trevorturk.com/2008/09/20/validating-your-fixtures/ | |
# I put this in test/models/. Trevor put his in test/integration/. | |
require 'test_helper' | |
class FixtureValidationTest < ActiveSupport::TestCase | |
test "fixtures should be valid" do | |
models = ActiveRecord::FixtureSet.all_loaded_fixtures.keys | |
models.each do |model| |
NewerOlder