Boris Mann

Open Source. Community. Decentralized Web. Building dev tools at Fission. Cooks & eats.

Home

Software

  • Last Edit: September 28, 2020

Tips

  • gitgit
    Local Git Exclude
    Edit the local exclude file in your git repo without having to edit the global .gitignore
    .git/info/exclude
    Source: StackOverflow
    Counting files in a git repo
    git ls-files | wc -l

    Source: Stackoverflow
  • JekyllJekyll
    Set env variable PAGES_REPO_NWO to build on Netlify
    Set the environment variable PAGES_REPO_NWO to a repo such as spadebuilders/EIPs if you want to have Jekyll sites build on Netlify.
    Posts by Year

    {% for post in site.posts %}
    {% capture current_year %}{{ post.date | date: "%Y" }}{% endcapture %}
    {% if current_year != previous_year %}
    {% unless forloop.first %}
    </ul>
    {% endunless %}
    <h2>{{ current_year }}</h2>
    <ul>
    {% assign...
  • Google SheetsGoogle Sheets
    Google Sheets tips & tricks
    Concatenate a Range
    Example usage: a column with a list of email addresses
    =textjoin(", ", 1, A1:A14)
  • UbuntuUbuntu
    Add a user to sudo group
    usermod -aG sudo <username>
    Count files recursively in a directory
    find <directory> -type f | wc -l
    Also suppress permission denied errors:
    find <directory> -type f 2> /dev/null | wc -l
    Reference Articles
    Installing node / yarn on Ubuntu 18
    https://linuxize.com/post/how-to-install-yarn-on-ubuntu-18-04/

    For nodejs, sudo apt-get install nodejs gets you node8 (which is old)
    So, need curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
    whi...
  • wgetwget
    Download an entire website with wget
    Source: Linux Journal
    wget \
    --recursive \
    --no-clobber \
    --page-requisites \
    --html-extension \
    --convert-links \
    --restrict-file-names=windows \
    --domains example1.com example2.com \
    --no-parent \
    example1.com

    You may also want to add --limit-rate=10k (or some similarly slow speed) so that you don’t trigger the site blocking you.
    Checking this into a git repo and putting it on GitHub Pages is a good way o...

Hosting

  • HerokuHeroku
    Heroku CLI https://devcenter.heroku.com/articles/heroku-cli
    Heroku Teams https://devcenter.heroku.com/articles/heroku-teams – it used to be awkward to “share” deployments, or have a fake company user that owned it; teams are free for up to 5 members, then $10 per month for more. Also no free dynos for teams.
    I have been using Heroku for many many years. Heroku was serverless (and containers) before either term existed. I have helped get a variety of open source software running on Heroku ...
    https://heroku.com