- Adding tags and search box feature to existing UI v3 code
- Remove the use of
dyn
function for routing case - Add dropdown and address bar routing
- Expanding Type API and removing MonadWidget constraint
- Adding content in home page
- Adding Luite's diff link to matrix table
This file contains hidden or 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
async fn docker_json_to_smth(arg: (Docker, &ContainerSummary)) -> () { | |
let (docker, csummary) = arg; | |
let container = docker | |
.inspect_container( | |
csummary.id.as_ref().unwrap(), | |
None::<InspectContainerOptions>, | |
) | |
.await | |
.unwrap(); |
This file contains hidden or 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
$remoteport = bash.exe -c "ip a | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport=$remoteport.Split("inet"); | |
foreach ($rp in $remoteport) { | |
if ($rp -match '172.\d{1,3}\.\d{1,3}\.\d{1,3}') { | |
$remoteport=$rp; | |
$remoteport=$remoteport.Split("/"); |
This file contains hidden or 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
{ jupyterWith | |
, haskellPackages | |
, haskellPkg ? (_: []) | |
, pythonPkg ? (_: []) | |
, pythonOverridesList ? [] | |
}: | |
let | |
jupyterSrc = jupyterWith + "/nix"; | |
inherit (import jupyterSrc {}) pkgs lib; |
This file contains hidden or 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 DB (dbTable, dbMap, dbFilter, runExpr) | |
import Prelude (error) | |
type FirstName = String | |
type LastName = String | |
type Age = Int | |
type City = String | |
data Row = Row FirstName LastName Age City |
This file contains hidden or 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
newPkgs: oldPkgs: | |
with oldPkgs; | |
let | |
noCheck = p: haskell.lib.dontCheck p; | |
noHaddock = p: haskell.lib.dontHaddock p; | |
fast = p: noHaddock (noCheck p); | |
static = p: haskell.lib.justStaticExecutables (fast p); | |
in { | |
# All haskellPackages |
This file contains hidden or 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
routeLink True r w = do | |
let cfg = (def :: ElementConfig EventResult t (DomBuilderSpace m)) | |
& elementConfig_eventSpec %~ addEventSpecFlags (Proxy :: Proxy (DomBuilderSpace m)) Click (\_ -> preventDefault) | |
& elementConfig_initialAttributes .~ "href" =: r | |
(e, a) <- element "a" cfg w | |
setRoute $ (switchPkgRoute (Just $ decodeFrag r)) <$ domEvent Click e | |
return a | |
routeLink False r w = do | |
let cfg = (def :: ElementConfig EventResult t (DomBuilderSpace m)) | |
& elementConfig_initialAttributes .~ "href" =: r |
This file contains hidden or 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
_ <- mdo | |
historyState <- manageHistory $ HistoryCommand_PushState <$> setState | |
let | |
f (currentSet, currentHistoryState, oldRoute) idxChange = | |
let newRoute = switchPkgRoute currentSet oldRoute idxChange | |
in | |
HistoryStateUpdate | |
{ _historyStateUpdate_state = DOM.SerializedScriptValue jsNull | |
, _historyStateUpdate_title = "" | |
, _historyStateUpdate_uri = newRoute |
This file contains hidden or 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
deepNested :: forall a. Event t a | |
n1 <- ... | |
... | |
... | |
n2 <- ... | |
... | |
... | |
n3 <- ... | |
... | |
... |
This file contains hidden or 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
window <- DOM.currentWindowUnchecked | |
history <- Window.getHistory window | |
location <- Window.getLocation window | |
oldUri <- (decodeFrag . T.pack . uriFragment) <$> getLocationUri location | |
backState <- wrapDomEvent window (`DOM.on` DOM.popState) $ do | |
e <- DOM.event | |
jV <- PopStateEvent.getState e | |
oUri <- liftJSM $ fromJSVal jV | |
pure $ decodeFrag $ fromMaybe (T.pack "") oUri | |
setState <- performEvent $ attachWith (switchRoutingState' history) (current route) changeStateE |