Skip to content

Instantly share code, notes, and snippets.

View daniel-vera-g's full-sized avatar
💭
Present

Daniel VG daniel-vera-g

💭
Present
View GitHub Profile
@daniel-vera-g
daniel-vera-g / gitlab-migration.sh
Last active April 7, 2021 13:18
Migrate multiple repositories from github to gitlab
#!/bin/bash
# To be used with: https://gist.github.com/daniel-vera-g/dc4df64ed1064406c8956f588c538d41
# Migrate multiple repositories from github to gitlab
# Name of repos to migrate
reposToMigrate=('')
# Name of gitlab domain
@daniel-vera-g
daniel-vera-g / update-branches-tags.sh
Last active April 7, 2021 13:17
Sync all branches and tags with new remote
#!/bin/bash
# To be used with: https://gist.github.com/daniel-vera-g/fcecac7103cae23ddfc80306d22fa7f0
# Sync all branches and tags with new remote
# Credits: https://gist.github.com/tamtamchik/2869690/
# Fetch all branches and tags
fetchAll() {
for branch in `git branch -r | grep -v HEAD | grep -v master`; do
#!/bin/bash
# Clean up temporary latex files
# Requires fd-find dependency
FilesToClean=("aux" "bbl" "blg" "fdb_latexmk" "fls" "log" "out" "pdf" "acn" "glo" "ist" "toc")
for file in ${FilesToClean[@]}; do
echo "Cleaning up ${file} files.."
fd -e $file --no-ignore -x rm {}

Install Spark on Mac

Install Homebrew(Package manager):

  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • brew upgrade && brew update

If not installed, install:

  1. Java:
@daniel-vera-g
daniel-vera-g / import-postgres-dump.md
Created January 3, 2024 11:02
import-postgres-dump
  1. (Optional) Create Database: createdb -U musicbrainz musicbrainz
  2. Create Schema in your Table: CREATE SCHEMA musicbrainz;
  3. Import Schema(There are some errors...let's ignore them): psql -U musicbrainz -d musicbrainz -f schema_dump.sql
  4. Import actual dump(Takes a while): psql -U musicbrainz -d musicbrainz -f dump.sql
  5. (Optional) Connect to DB & check data:
  • psql -U musicbrainz -d musicbrainz
  • Something like:
musicbrainz=# select name from artist limit 10;