Run from ghci
. Must have attoparsec
available via cabal repl
.
:set -XOverloadedStrings
import Prelude
import Control.Applicative
import Data.Attoparsec.Text
data IPAddress = IPAddress Int Int Int Int deriving (Eq, Show)
ALTER TABLE your_table_name_here | |
ADD PARTITION (year='2017', month='*', day='*') | |
LOCATION 's3://your-alb-log-bucket/processed/AWSLogs/00000-change-with-your-account-id/elasticloadbalancing/us-east-1-change-with-your-region/2017/' |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{- | |
build-depends: base >=4.7 && <4.8 | |
, aeson | |
, aeson-qq | |
, bytestring | |
, text |
Run from ghci
. Must have attoparsec
available via cabal repl
.
:set -XOverloadedStrings
import Prelude
import Control.Applicative
import Data.Attoparsec.Text
data IPAddress = IPAddress Int Int Int Int deriving (Eq, Show)
#!/bin/bash | |
SINK_INDEX=$(pacmd list-sinks | grep index | sed -e 's/^.* //') | |
if [[ $1 == "internal" ]]; then | |
pactl set-card-profile 0 output:analog-stereo+input:analog-stereo | |
elif [[ $1 == "hdmi" ]]; then | |
pactl set-card-profile 0 output:hdmi-stereo-extra1+input:analog-stereo | |
elif [[ $1 == "down" ]]; then | |
echo "Volume down 5%" |
Here are some local Austin places worth checking out that's somewhat near the hotel. I'll add more to the list when I have time.
FYI: There's no Uber or Lyft in Austin, but Fasten is a decent replacement.
// data Foo = Bar Int | Baz String | |
public abstract class Foo | |
{ | |
public sealed class Bar : Foo | |
{ | |
public int Value { get; set; } | |
} | |
public sealed class Baz : Foo | |
{ |
// Enter :paste mode | |
trait Length[M[_]] { | |
def length[A](xs: M[A]): Int | |
} | |
object Length { | |
implicit val LengthList: Length[List] = new Length[List] { | |
def length[A](xs: List[A]): Int = { | |
xs.length |
{-# LANGUAGE OverloadedStrings #-} | |
import Data.Monoid (mappend) | |
import Hakyll | |
import Hakyll.Web.Sass (sassCompiler) | |
main :: IO () | |
main = hakyll $ do | |
match "scss/*" $ do | |
route $ setExtension "css" | |
compile sassCompiler |
/* Routing trait for mixing in routes */ | |
trait RoutingService extends Directives { this: HttpServiceActor => | |
private val EmptyRoute: Route = { context => Unit } | |
def routes: Route = EmptyRoute | |
/* Used to concatenate `Route`s together */ | |
def concatRoutes(superRoutes: Route)(routes: Route): Route = superRoutes match { | |
case EmptyRoute => routes | |
case _ => superRoutes ~ routes | |
} |
.gitignore
file for Scala
.DS_Store/
to .gitignore
./project/Build.scala
over ./Build.sbt
./project/plugins.scala
with latest version numbersaddSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.10.1")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.2")