HN user

tionis

242 karma

website: https://tionis.dev email: hackernews@tionis.dev

Posts8
Comments59
View on HN

I've been using git + git-lfs to manage, sync and backup all my files (including media files and more) and it's quite convenient, but native support for large files would be great. I'd for example really like to be able to push large objects directly from one device to the next.

At the moment I'm using my own git server + git lfs deduplication using btrfs to efficiently handle the large files.

If large objects are just embedded in various packfiles this approach would no longer work, so I hope that such a behaviour can be controlled.

That's actually something I implemented for a university project a few weeks ago. My professor also did some research into how this can be used for more advanced UIs. I'm sure it's a very common idea.

Dumb Pipe 12 months ago

Well pipe.pico.sh always uses a proxy server so throughput and latency are worse, but you have your own namespace for the pipes and thus don't have to synchronize random connection strings

I'm also having that problem right now, my solution so far is to host an elasticsearch server somewhere else (at home on an old laptop via a tuns.sh ssh tunnel)

The New Internet 2 years ago

Yggdrasil would indeed better fit the description. It should however be noted, that, while it does work great, is still a research project.

I'm currently using a git based approach for my dotfiles, similar to the one notes here[1]. I've got one significant change, though: All my dotfile management works over my cfg[2] script that helps me maintain a main branch for dotfiles for all machines and then branches that branch off of that main like 'main.arch.MACHINE_NAME' that are merged like a waterfall during sync (main -[merge]-> main.arch -[merge]-> main.arch.MACHINE_NAME). (I can also cherry pick up the waterfall)

[1] https://www.atlassian.com/git/tutorials/dotfiles [2]: https://gist.github.com/tionis/a0f23a7a33b0e289f1b03cc6ff503...

And I made it into a bash script (with a header to have stacktraces in bash):

  #!/bin/env bash
  #--------------------------------------------
  set -Eeuo pipefail
  if [[ -n "${DEBUG:-}" ]]; then
    set -x
  fi
  trap stack_trace ERR
  function stack_trace() {
    echo -e "\nThe command '$BASH_COMMAND' triggerd a stacktrace:\nStack Trace:"
    for (( i = 1; i < ${#FUNCNAME[@]}; i++ )); do
      echo "    ($i) ${FUNCNAME[$i]:-(top level)} ${BASH_SOURCE[$i]:-(no file)}:${BASH_LINENO[$(( i - 1 ))]}"
    done
  }
  error(){ echo "${1:-error message missing}" && trap true ERR && exit 1; }
  SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
  export SCRIPT_DIR
  #--------------------------------------------
  function dnsq {
    # https://www.petefreitag.com/blog/dns-over-https/
    while [[ $# -gt 0 ]]; do
      case "$1" in
        -h|--help)
          echo "Usage: $0 example.com"
          echo '  -n --name    DNS query name(s)'
          echo '  -t --type    DNS query type(s), ex: A (default), MX, TXT...'
          echo '  -d --dns     DNS query endpoint: cloudflare (default), google'
          echo '  -h --help    Print this help message and exit'
          return 0
          ;;
        -n|--name)
          shift
          _flag_name+=("$1")
          ;;
        -t|--type)
          shift
          _flag_type+=("$1")
          ;;
        -d|--dns)
          shift
          _flag_dns="$1"
          ;;
        \*)
          _flag_name+=("$1")
          ;;
      esac
      shift
    done

    if [[ ${_flag_name:-} = "" ]]; then
      echo 'Missing name parameter.'
      return 1
    fi

    if [[ ${_flag_type:-} = "" ]]; then
      _flag_type=("A")
    fi

    case ${_flag_dns:-cloudflare} in
      "google")
        url="https://8.8.8.8/resolve"
        ;;
      "cloudflare")
        url="https://1.1.1.1/dns-query"
        ;;
    esac

    for type in "${_flag_type[@]}"; do
      for name in "${_flag_name[@]}"; do
        query="name=$name&type=$type"
        if [[ -t 1 ]] && command -v jq >/dev/null; then
          curl --header 'Accept: application/dns-json' --silent "$url?$query" | jq -r
        else
          curl --header 'Accept: application/dns-json' --silent "$url?$query"
        fi
      done
    done
  }

  dnsq "$@"

Discord uses it for their backend I think. Interestingly WhatsApp's backend is also built on Beam, but using Erlang directly instead.