clearbit API
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 User < ActiveRecord::Base | |
has_many :memberships | |
has_many :groups, through: :memberships | |
end | |
class Group < ActiveRecord::Base | |
has_many :memberships | |
has_many :members, class_name: 'User', through: :memberships | |
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
class App { | |
ready() { | |
alert("hello") | |
} | |
} | |
const app = new App() | |
document.addEventListener("DOMContentLoaded", app.ready.bind(app)) | |
// or |
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
package main | |
type Addable interface { | |
Total int | |
Add(value int) int | |
} | |
func (addable *Addable) Add(value int) int { | |
addable.Total = addable.Total + value |
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
*.so |