Watch the breakdown here in a Q4 2024 prompt engineering update video
- Quick, natural language prompts for rapid prototyping
- Perfect for exploring model capabilities and behaviors
Watch the breakdown here in a Q4 2024 prompt engineering update video
Build image
docker build --tag <image tag>
Run container exposing port 4444 and mounting /views directory
docker run -p 4444:4444 /${PWD}/views:/code/views <image tag>
List running containers
const fetch = require('node-fetch') | |
const am = require('am') | |
async function main() { | |
const url = 'https://www.example.com' | |
const response = await fetch(url) | |
const responseHeaders = Object.fromEntries(resp.headers.entries()) | |
console.dir(responseHeaders) | |
return responseHeaders | |
} |
#!/bin/bash | |
# Define variables | |
DOMAIN=foo.example.com | |
# renew cert | |
certbot renew | |
# combine latest letsencrypt files for mongo |
// Moved to a new home at https://github.com/biinari/zonefile-extract/tree/master/123-reg |
-- before: data_json = {object: {id: 123, result: null}} | |
-- after: data_json = {object: {id: 123}} | |
UPDATE events | |
SET data_json = data_json::jsonb #- '{object,result}' | |
WHERE json_typeof(data_json->'object'->'result') = 'null'; |
If you have multiple applications on Heroku and would like to use a single Logentries account for all of them, this is how you do it. Basically, do not use add-ons, and send all drains to your account.
Add Log
Manual
access.log
new
set named myapp-{environment}
, for instance myapp-staging
(at least, this is how I like to name my entries)Plain TCP, UDP - logs are sent via syslog
optionCreate Log Token
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, Error); |
RecyclerView
does not have an OnItemClickListener like it's predecessor, ListView
. However, detecting item clicks is pretty simple.
Set an OnClickListener
in your ViewHolder
creation:
private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {
public static class ViewHolder extends RecyclerView.ViewHolder