Skip to content

Instantly share code, notes, and snippets.

type PlayPauseMessage =
{ play :: Boolean }
type SkipMessage =
{ skip :: Int }
data Message
= PlayPause PlayPauseMessage
| Skip SkipMessage
{
"etag": "\"RmznBCICv9YtgWaaa_nWDIH1_GM/XPwtaUVS1YHeaqOqM5QXLXM0-vU\"",
"items": [
{
"etag": "\"RmznBCICv9YtgWaaa_nWDIH1_GM/CcqOjx_q-jaK3Lst_gsR8L4tadQ\"",
"id": {
"kind": "youtube#video",
"videoId": "dQw4w9WgXcQ"
},
"kind": "youtube#searchResult",
type SearchResult =
{ videoId :: String
, title :: String
, channelTitle :: String
, thumbnail :: String
, description :: String
}
type SearchResults = Array SearchResult
let (loadedVideo :: Maybe VideoId) = old.loadedVideoId
let (nextVideo :: Maybe VideoId) = _.id <$> head new.app.queue
liftEff $
case new.app.play /\ nextVideo of
true /\ loadedVideo -> YT.callPlayer player "playVideo" []
true /\ Just nextVideo' -> YT.callPlayer player "loadVideoById" [unwrap nextVideo']
_ -> YT.callPlayer player "pauseVideo" []
player <- liftAff $ YT.initPlayer "player"
\foo -> -- would need player here
a <- liftAff $ createA (\x -> -- would need 'a' here)
eval :: Query ~> H.ComponentDSL FrontendState Query Message (Aff _)
-- Handle initialization
eval (Init next) = do
-- Initialize YouTube player
player <- liftAff $ YT.initPlayer "player"
-- Player's 'onReady' handler, here we should call updatePlayerState with the *current* state
(\p -> do
let (state :: FrontendState) = H.get -- This won't work as we're in Eff here... :(
launchAff_ $ updatePlayerState state p
android-env-chrootenv:rasse@rasse-laptop:~/Android/Sdk/build-tools/23.0.1$ ldd aapt
linux-gate.so.1 (0xf7f9a000)
libc++.so => /home/rasse/Android/Sdk/build-tools/23.0.1/./lib/libc++.so (0xf7db9000)
librt.so.1 => /usr/lib32/librt.so.1 (0xf7db0000)
libdl.so.2 => /usr/lib32/libdl.so.2 (0xf7dab000)
libpthread.so.0 => /usr/lib32/libpthread.so.0 (0xf7d8d000)
libz.so.1 => /usr/lib32/libz.so.1 (0xf7d74000)
libm.so.6 => /usr/lib32/libm.so.6 (0xf7c79000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7c5c000)
libc.so.6 => /usr/lib32/libc.so.6 (0xf7a8e000)
android-env-chrootenv:rasse@rasse-laptop:~/Android/Sdk/build-tools/23.0.1$ strace -f ./aapt
execve("./aapt", ["./aapt"], 0x7ffeca4f9a98 /* 152 vars */) = -1 ENOENT (No such file or directory)
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 10), ...}) = 0
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
getpid() = 12298
exit_group(1) = ?
+++ exited with 1 +++
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "customEdid";
src = ./1920x1080.bin;
phases = [ "installPhase" ];
installPhase = ''