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
BufferSoundFileView : SoundFileView { | |
var buffer; | |
*new { |parent, bounds, buffer| | |
^super.new.init(parent, bounds, buffer); | |
} | |
init { |parent, bounds, buffer| | |
buffer = buffer; |
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
VBufferCollection { | |
var <buffers, views; | |
*new { |server, numBuffersOrPaths, numFrames=0, numChannels=1| | |
^super.new.init(server, numBuffersOrPaths, numFrames, numChannels); | |
} | |
init { |server, numBuffersOrPaths, numFrames=0, numChannels=1| | |
buffers = case | |
{numBuffersOrPaths.class == PathName && {numBuffersOrPaths.isFolder}} { |
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
VBufferCollection { | |
var <buffers, views; | |
*new { |server, numBuffersOrPaths, numFrames=0, numChannels=1| | |
^super.new.init(server, numBuffersOrPaths, numFrames, numChannels); | |
} | |
init { |server, numBuffersOrPaths, numFrames=0, numChannels=1| | |
buffers = case | |
{numBuffersOrPaths.class == PathName && {numBuffersOrPaths.isFolder}} { |
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
# config/routes.rb | |
Rails.application.routes.draw do | |
mount UserStats::Engine, at: "/user_stats" | |
# ... | |
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
( | |
Server.killAll; | |
~num_buffers = 4; | |
~num_channels = 12; | |
~rec_end = ~num_buffers.collect { 0 }; | |
~gtranspose = ~num_buffers.collect { 0 }; | |
~density = ~num_buffers.collect { 0.0 }; | |
~stretch = 1.0; |
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 LocaleReflex < ApplicationReflex | |
def switch | |
@locale = element.value | |
end | |
end | |
class ApplicationController < ActionController::Base | |
around_action :switch_locale | |
def switch_locale(&action) |
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
// useIdle | |
away(event) { | |
consumer.subscriptions.add(this.presenceChannel); | |
} | |
back(event) { | |
this.presenceChannel.unsubscribe(); | |
} |
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
import { Controller } from "stimulus"; | |
import { get } from "@rails/request.js"; | |
import { PageSnapshot } from "@hotwired/turbo"; | |
export default class extends Controller { | |
static values = { hoverTime: Number }; | |
connect() { | |
this.element.addEventListener("mouseover", this.prefetch.bind(this)); | |
this.element.addEventListener("touchstart", this.prefetch.bind(this)); | |
} |
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
<!-- app/views/boards/_board.html.erb --> | |
<ul class="..." | |
data-controller="board" | |
data-board-signed-resource-value="<%= board.to_sgid.to_s %>" | |
id="<%= dom_id(board) %>"> | |
<!-- ... --> | |
</ul> |
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
<!-- app/views/boards/_board.html.erb --> | |
<ul class="..." | |
data-controller="board" | |
data-board-signed-resource-value="<%= board.to_sgid.to_s %>" | |
id="<%= dom_id(board) %>"> | |
<!-- ... --> | |
</ul> |