Skip to content

Instantly share code, notes, and snippets.

View amrro's full-sized avatar
🏍️

Amr Elghobary amrro

🏍️
  • 02:26 (UTC +03:00)
View GitHub Profile
@Flip-Liquid
Flip-Liquid / postgres-backup.md
Last active May 15, 2023 17:46
A quick step-by-step to backup and restore a remote postgres database

Backing up postgres DBs

Our data is hosted in postgres clusters accessible via the internet. Follow these steps to backup a remote instance, and restore the data on your local instance.

This example assumes the remote cluster is using postgres version 14.

  1. Install postgresql 14 on your machine. This will give you access to the pg_dump tool, which we'll use to take a backup of our cloud postgres instance.
    • OSX steps (make sure to replace 13 with 14)
    • (Linux steps) run sudo apt-get install postgres-14
  2. Ensure you have access to a DB role that has the proper permissions to access staging data
@tadly
tadly / pacaur_install.sh
Last active August 30, 2023 13:15
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
#
# !!! IMPORTANT !!!
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144)
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though.
#
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
@gsoltis
gsoltis / RxFirebase.java
Last active May 6, 2024 03:16
RxJava Bindings for Firebase
package com.firebase.client;
import com.firebase.client.core.Constants;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action0;
import rx.functions.Func1;
import rx.subscriptions.Subscriptions;
public class RxFirebase {