Create backup of metabase using pg_dump
pg_dump -Fc -h localhost metabase > metabase-1.pgdump
Restore on prod, restore.sh
#!/bin/bash
# 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 |
Hi there. Welcome to my channel.
Here we will solve Rach's dilemma.
Ready ?
You may jump to Tl;dr
Consider this program:
#include<stdio.h>
int main(){