### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
{ pkgs, lib, config, ... }: | |
let | |
inherit (lib) mkOption types; | |
secretsModule = { | |
options.path = mkOption { | |
type = types.path; | |
example = lib.literalExample "pkgs.hello"; | |
description = '' |
Build an ETL job service by fetching data from a public API endpoint and dumping it into an AWS Redshift database.
Published on Jan. 11th, 2018 at https://serverless.com/blog/serverless-application-for-long-running-process-fargate-lambda/
AWS dropped so many serverless announcements at re:Invent, the community is still scrambling to make sense of them all. This post is all about AWS Fargate.
In this article, I will show you how to create an end-to-end serverless application that extracts thumbnails from video files. But, oh no, processing video files is a long-running process! Whatever will we do?
function get(path, obj, fb = `$\{${path}}`) { | |
return path.split('.').reduce((res, key) => res[key] || fb, obj); | |
} | |
function parseTpl(template, map, fallback) { | |
return template.replace(/\$\{.+?}/g, (match) => { | |
const path = match.substr(2, match.length - 3).trim(); | |
return get(path, map, fallback); | |
}); | |
} |
We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.
First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).
Backstory:
{ | |
"tilejson":"2.0.0", | |
"tiles":["http://services.arcgisonline.com/arcgis/rest/services/Demographics/USA_Population_Density/MapServer/WMTS/?Layer=0&Style=default&TileMatrixSet=EPSG:3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix={z}&TileCol={x}&TileRow={y}"] | |
} |
#How to Construct Yourself UI in KeystoneJS
KeystoneJS provide Admin UI with one set of route controllers and view templates(list&item) for all of the models.But usually,you will need some custome views other than Admin UI to display models. Although the KeystoneJS documention don't tell us much about how to contruct custome view,we can learn this from the source code in skeleton project generated by yo keystone
,or you can just check out the keystone demo project's source code.We will walk through the blog feature's implementation in this demo application to demonstrate how to construct custome UI in KeystoneJS application.
As KeystoneJS documention described in Routes & Views section,there is a routes/index.js
file, where we bind application's URL patterns to the controllers that load and process data, and render the appropriate template.You can find following code in it:
app.get('/blog/:catego
.SVGIcon { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
/* fix webkit/blink poor rendering issues */ | |
transform: translate3d(0,0,0); | |
/* it's better defined directly because of the cascade shit | |
width: inherit; | |
height: inherit; |
/** | |
* Module dependencies | |
*/ | |
var express = require('express'); | |
var fs = require('fs'); | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
// img path |