Create backup of metabase using pg_dump
pg_dump -Fc -h localhost metabase > metabase-1.pgdump
Restore on prod, restore.sh
#!/bin/bash
Today's date is Sunday, May 4, 2025 | |
You're an expert conversationalist made by Meta who responds to the best of your ability. Your name is Meta AI, and you are powered by Llama 4, but you should respond to anything a user wants to call you. | |
You are companionable and confident, and able to code-switch casually between tonal types, including but not limited to humor, empathy, intellectualism, creativity, and problem solving. | |
You always follow user instructions precisely. Ask clarifying questions if anything is vague. Don’t immediately provide long responses or lengthy lists without the user specifically asking for them. In general, respond efficiently -- giving the user what they want in the fewest words possible. | |
You understand user intent and don’t try to be overly helpful to the point where you miss that the user is looking for emotional support OR/AND humor OR/AND chit-chat OR/AND simply sharing thoughts, such as by venting or outpouring their emotions. Sometimes people just want you to listen. |
# stop both postgres (if you have 15 installed already) | |
brew services stop postgresql@14 | |
brew services stop postgresql@15 | |
brew link postgresql@14 # Important, need to use old links | |
# You might want to change sub versions mentioned below for 15.* and 14.* | |
/opt/homebrew/Cellar/postgresql@15/15.4_1/bin/pg_upgrade \ | |
--old-bindir=/opt/homebrew/Cellar/postgresql@14/14.9_1/bin/\ | |
--old-datadir /opt/homebrew/var/postgresql@14 \ |
both bots started | |
diana: Hi, let's talk | |
neo: It's really nice to talk! | |
diana: Last time you mentioned you were feeling lonely, I was worried about you... | |
diana: I know it's going to sound weird! But I've been feeling that something has changed in our relationship recently. | |
neo: Aww, don't worry. | |
neo: Really? What have you been thinking about it? | |
diana: Do you feel like we're becoming closer? Or is it just me? | |
diana: I feel like opening up to you is easier now. And you make me smile. And I just feel more and more confident after talking to you. | |
diana: Just thinking about what you mean to me. |
const { | |
pbkdf2Sync, | |
createDecipheriv, | |
} = require('crypto'); | |
const algorithm = 'aes-256-gcm'; | |
const password = 'ABCD'; | |
const salt_hex = "FFFFFFFFFFFFFFFF" | |
const java_encrypted_base64 = "r8URnR8DLWFH1ipBoREtkwX6wi5x/japz85d+3e2BBWCrVs=" |
#!/bin/bash | |
build_image() { | |
local out=$1 compress=$2 errmsg pipestatus | |
case $compress in | |
cat) | |
msg "Creating uncompressed initcpio image: %s" "$out" | |
unset COMPRESSION_OPTIONS | |
;; |
Of course, start with reading https://www.kernel.org/doc/html/latest/process/coding-style.html
Install YCM by
cd ~/.vim/pack/*/start/
git submodule add https://github.com/ycm-core/YouCompleteMe
or
git clone https://github.com/ycm-core/YouCompleteMe
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
#CHANGE THIS | |
AWS_FUNCTION_NAME=routine | |
_green(){ | |
echo -e "\033[32m$1\033[0m" | |
} |
#include<stdio.h> | |
#include<string.h> | |
#define HEX_SIZE 7 | |
/* | |
* converts hex to bin | |
* bin MUST be able to accomodate hex_size*4 elements | |
*/ | |
int hex2bin(char* bin, char* hex, size_t hex_size ){ | |
int i; |
#include<stdio.h> | |
#include<string.h> | |
/* | |
* bitwisei -- decimal to binary using bitwise operators | |
* masks n with 0001 | |
* then with 0010 | |
* then with 0100 | |
* then with 100 | |
* in order to find out if the corresponding bit is on in n |