Create backup of metabase using pg_dump
pg_dump -Fc -h localhost metabase > metabase-1.pgdump
Restore on prod, restore.sh
#!/bin/bash
const { | |
pbkdf2Sync, | |
createDecipheriv, | |
} = require('crypto'); | |
const algorithm = 'aes-256-gcm'; | |
const password = 'ABCD'; | |
const salt_hex = "FFFFFFFFFFFFFFFF" | |
const java_encrypted_base64 = "r8URnR8DLWFH1ipBoREtkwX6wi5x/japz85d+3e2BBWCrVs=" |
# 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 \ |
#!/bin/bash | |
# (C) Hritik Vijay | |
# License: GPLv2 | |
# Suppliment to https://m47r1x.github.io/posts/multi-net/ | |
tmp=$(mktemp multi-net-ip-XXXX --tmpdir) | |
TIMEOUT=5 | |
Table=200 | |
_ping(){ |
#include "DigiKeyboard.h" | |
#define LED_PIN 1 | |
void setup() { | |
pinMode(LED_PIN, OUTPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
digitalWrite(LED_PIN, LOW); | |
DigiKeyboard.sendKeyStroke(0); |
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. |
#!/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; |