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
defmodule ScoutApm.Store do | |
@moduledoc "Singleton that manages the state of the Agent's data. Mostly just\nroutes data to the correct per-minute data structure\n\nAlso is the core \"tick\" of the system, so each X seconds, the data\ncollected is checked to see if it's ready to be reported. If so, the\nreporting process is kicked off.\n" | |
use GenServer | |
alias ScoutApm.Internal.Metric | |
alias ScoutApm.Internal.WebTrace | |
alias ScoutApm.Internal.JobRecord | |
alias ScoutApm.Internal.JobTrace | |
alias ScoutApm.StoreReportingPeriod |
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
namespace :elm do | |
Apps = [ "WorkspaceMain", "ManageSubscribersMain", "NotebookMain", "ResponsesMain" ] | |
JsFileName = "irn_elm.js" | |
JsOutputDir = "app/assets/javascripts" | |
desc "Updates packages, compiles the Elm code and copies it to #{JsOutputDir}" | |
task :compile_and_copy => [:package_install, :make, :copy] do | |
puts "Updated Packages, Compiled and copied Elm code to #{JsOutputDir}" | |
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
module LoginForm (Model, init, Action, update, view) where | |
import Html exposing (..) | |
import Html.Attributes exposing (value, placeholder) | |
import Html.Events exposing (on, targetValue, onClick) | |
import Http | |
import Json.Decode as Json | |
import Effects | |
import Task |
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 'benchmark' | |
CALLER = caller | |
REGEX = /(\/app\/(controllers|models|views)\/.+)/.freeze | |
def constant_regex | |
CALLER.each { |x| x.match(REGEX) } | |
end | |
def literal_regex |
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
fn main() { | |
let mut g = Game::new(10, 10); | |
g.alive(0,0); | |
g.alive(2,2); | |
let ns = g.neighbors(1,1); | |
println!("{:?}", ns); | |
println!("{}", g.format()); | |
} | |
#[derive(Debug)] |
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 Signal exposing (Signal, Address) | |
import Html exposing (Html, div, button, text) | |
import Html.Events exposing (onClick) | |
import Task | |
main : Signal Html | |
main = | |
start { model = model | |
, view = view | |
, update = update } |
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
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module Grocery.Database.Calendar where | |
import Grocery.DatabaseSchema | |
import Grocery.Types.Meal | |
import Grocery.Types.Recipe | |
import Grocery.Types.Food | |
import Database.Persist |
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
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module Grocery.Database.Calendar where | |
import Grocery.DatabaseSchema | |
import Grocery.Types.Meal | |
import Database.Persist | |
import Database.Persist.Sqlite | |
import qualified Database.Esqueleto as E |
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
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
module Grocery.Database.Calendar where | |
import Grocery.DatabaseSchema | |
import Grocery.Types.Meal | |
import Database.Persist | |
import Database.Persist.Sqlite | |
import qualified Database.Esqueleto as E | |
import Database.Esqueleto ((^.)) |
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
module Grocery.Database.Calendar where | |
import Grocery.DatabaseSchema | |
import Grocery.Types.Meal | |
import Database.Persist | |
import Database.Persist.Sqlite | |
import qualified Database.Esqueleto as E | |
import Database.Esqueleto ((^.)) | |
import Data.Time | |
import Data.Text |
NewerOlder