1. Install and start mongo service [official docs]
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
## How to hide API keys from github ## | |
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while | |
retaining your commits: https://help.github.com/articles/remove-sensitive-data/ | |
2. In the terminal, create a config.js file and open it up: | |
touch config.js | |
atom config.js |
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
import { fileURLToPath } from 'url'; | |
import path, { dirname } from 'path'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = dirname(__filename); | |
export default { | |
// all the usual config goes here... | |
/etc/pve/qemu-server/VMID.conf
args: -fsdev local,security_model=mapped,id=fsdev0,path=/path/to/share -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare
This tells qemu to create a 9pvirtio device exposing the mount_tag hostshare
(just a name to identify the mount point). That device is coupled to an fsdev named fsdev0, which specifies which portion of the host filesystem we are sharing, and in which mode.
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
DOMAIN_NAME=$1 | |
openssl req \ | |
-newkey rsa:2048 \ | |
-x509 \ | |
-nodes \ |
I have a content type with a media (image) entity reference field (field_thumbnail_image) and I want to grab its file URL. For this, I need to load the media entity, isolate its source object using getSource, then load this source as a file entity so I can make a proper URL.
// load the media entity from the media entity reference field
$media_entity = Media::load($entity->field_thumbnail_image->target_id);
// get the file source value for the media entity
$source_value = $media_entity->getSource()->getSourceFieldValue($media_entity);
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.
local wezterm = require 'wezterm'; | |
return { | |
color_scheme = "Dracula", | |
-- colors = { | |
-- background = "#0c0e14", | |
-- }, | |
window_decorations = "NONE", | |
font = wezterm.font("Iosevka"), | |
font_size = 10.0, | |
-- dpi = 192.0, |
#AwayFromKeyboardRev9# | |
{"version":1,"profile":{"commands":[{"path":"\/sys\/devices\/system\/cpu\/cpu3\/onlinechmod644","command":"chmod 644 \/sys\/devices\/system\/cpu\/cpu3\/online"},{"path":"\/sys\/devices\/system\/cpu\/cpu3\/online","command":"echo '1' > \/sys\/devices\/system\/cpu\/cpu3\/online"},{"path":"\/sys\/devices\/system\/cpu\/cpu3\/onlinechmod444","command":"chmod 444 \/sys\/devices\/system\/cpu\/cpu3\/online"},{"path":"\/sys\/devices\/system\/cpu\/cpu4\/onlinechmod644","command":"chmod 644 \/sys\/devices\/system\/cpu\/cpu4\/online"},{"path":"\/sys\/devices\/system\/cpu\/cpu4\/online","command":"echo '1' > \/sys\/devices\/system\/cpu\/cpu4\/online"},{"path":"\/sys\/devices\/system\/cpu\/cpu4\/onlinechmod444","command":"chmod 444 \/sys\/devices\/system\/cpu\/cpu4\/online"},{"path":"\/sys\/module\/workqueue\/parameters\/power_efficientchmod","command":"chmod 644 \/sys\/module\/workqueue\/parameters\/power_efficient"},{"path":"\/sys\/module\/workqueue\/parameters\/power_efficient","command":"echo 'N |
This is not working complete code.
This is strictly a v0.2, scrapy, proof of concept version of a personal AI Assistant working end to end in just ~726 LOC.
This is the second iteration showcasing the two-way prompt aka multi-step human in the loop. The initial, v0, assistant version is here.
It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.
To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.