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
alert('hello'); |
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 AreBelongToUs; | |
use strict; | |
use warnings; | |
# use feature 'signatures'; | |
# use feature ':5.34'; | |
use experimental qw(signatures); | |
## no critic (:signatures) | |
use Exporter qw<import>; | |
use Test2::V0; |
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
mod server; | |
use server::Server; | |
use tokio::{ | |
io::{AsyncBufReadExt, AsyncWriteExt, BufReader}, | |
net::TcpListener, | |
sync::broadcast, | |
}; | |
#[tokio::main] | |
async fn main() { |
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 Image | |
include Mongoid::Document | |
include Mongoid::Paperclip | |
include Mongoid::Slug | |
include ComparableByIndex | |
include CanBePublished | |
embedded_in :portfolio_item, inverse_of: :images | |
field :title, type: String | |
slug :title, history: 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 PortfolioItem | |
include Mongoid::Document | |
include Mongoid::Slug | |
include ComparableByIndex | |
include CanBePublished | |
embedded_in :portfolio, inverse_of: :portfolio_items | |
field :title | |
slug :title, history: true, scope: :portfolio | |
field :client, type: String |
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 Portfolio | |
require 'slug' | |
include Mongoid::Document | |
include Mongoid::Slug | |
include ComparableByIndex | |
include CanBePublished | |
field :title, type: String | |
slug :title, history: true | |
field :description, type: String | |
embeds_many :portfolio_items, cascade_callbacks: true |