Coder Social home page Coder Social logo

dotfiles's People

Contributors

roelfie avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

dotfiles's Issues

Add section for device removal

What to do if a device gets lost / was stolen / is sold?

  • Remove ssh keys from GitHub
  • Remove device from 1Password's allowed devices
  • Same for Dropbox?
  • In Apple 'Find My' mark the device as stolen, and file an erase request
  • ... ?

Python build fails

setup_python.zsh fails:

<<< Setup Python >>>

pyenv should already have been installed with Homebrew:
pyenv 2.3.17
Before we continue, it is recommended that you now (manually) install the python build dependencies for macOS.
Please follow the instructions on the pyenv web page that we have opened in your browser.
(typically something like 'brew install openssl readline sqlite3 xz zlib tcl-tk')
Press [Enter] to continue. 
Installing the latest python version into /Users/roelfie/.pyenv/versions.
python-build: use [email protected] from homebrew
python-build: use readline from homebrew
Downloading Python-3.12.0a7.tar.xz...
-> https://www.python.org/ftp/python/3.12.0/Python-3.12.0a7.tar.xz
Installing Python-3.12.0a7...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 12.5 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/w0/dl3x9q2j00qcp8p80xnkcb100000gn/T/python-build.20230511122800.71069
Results logged to /var/folders/w0/dl3x9q2j00qcp8p80xnkcb100000gn/T/python-build.20230511122800.71069.log

Last 10 log lines:
	if test $? -ne 0 ; then \
		echo "generate-posix-vars failed" ; \
		rm -f ./pybuilddir.txt ; \
		exit 1 ; \
	fi
DYLD_LIBRARY_PATH=/var/folders/w0/dl3x9q2j00qcp8p80xnkcb100000gn/T/python-build.20230511122800.71069/Python-3.12.0a7 ./python.exe -E -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
zsh:1: parse error near `fi'
make: *** [rundsymutil] Error 1
make: *** Waiting for unfinished jobs....
Checked 111 modules (30 built-in, 79 shared, 2 n/a on macosx-12.5-arm64, 0 disabled, 0 missing, 0 failed on import)
Latest python 3 version installed. Available versions: 
* system (set by /Users/roelfie/.pyenv/version)
Open a new terminal and do 'pyenv global <version>' to select the latest python version (if necessary).
When you have selected the desired version, we will install global python packages.
Press [Enter] when done. 
Installing global python packages.
./scripts/setup_python.zsh:28: command not found: pip
Command [./scripts/setup_python.zsh] failed

Backup cloned git repositories to Dropbox.

~/workspaces contains many cloned (github, gitlab, ..) projects (both private and work). When I spin up a new machine, I would like all these repositories to be available without having to clone them manually one by one.

  1. Generate a list of all git repositories that we can use to rebuild our entire workspace.
  2. Extend the setup_workspaces.zsh script to clone all listed repositories.
  3. Store the list in Dropbox (not in the .dotfiles folder, because it contains private repo URLs that I don't want to be visible to the outside world).

Conflicting 'code' commands

We've added the location of the code binary within the VS Code app to our PATH variable, so that will be ready to go when we reinstall everything.

We don't need (or want) to do the manual Command Palette approach, but Homebrew will do something similar as an "artifact" of the install, and this will conflict with the other command in our PATH.

Use config files to populate the stacks in the Dock.

Currently the Dock stacks are populated in https://github.com/roelfie/dotfiles/blob/main/scripts/setup_dock.zsh#L100. Which is a bit hard to maintain. And each time you install a new cask, you have to remember to extend this setup script with the new application.

Try to extract the stack info from the setup script into a config file, just like we did for setup_workspaces.zsh.

TODO:

  1. move folder docks/icons from resources to config.
  2. create JSON file config/dock/stacks.conf.yaml.
  3. adjust setup_dock.zsh so that it uses stacks.conf.yaml.
  4. create commands to add / remove applications from a stack.
  5. wrap the "brew install --cask " command in a script that, once installed, automatically adds the application to the specified stack: "cask-install " just installs, but "cask-install --stack="dev" should add it to the "dev" stack
  6. and perhaps a script to remove broken links from stacks.conf.yaml?

Backup list of installed Node & Python packages

pip seems to be supported by mackup, but running 'mackup backup' did not add anything new to /Dropbox/Apps/Mackup.

Find out how to properly back up / restore globally installed python and Node packages (similar to the 'Brewfile' for homebrew).
We may have to extend the bookkeeper to achieve that?

Resume installation after setup_macos.zsh finished

setup_macos.zsh now finishes with restarting some applications, Terminal being one of them.
This causes the installation process to stop.

Make it resume automatically afterwards, or at least provide an instruction to the user.

Log brew, npm and pip upgrades to separate files.

At this moment the bookkeeper logs everything to a single backup file (bookkeeper.log).

To get a better timeline of what happened to my machine, try to create multiple log files:

  • bookkeeper.log: General log messages
  • brew_upgrades.log
  • pip_upgrades.log
  • npm_upgrades.log

This way, when we run into trouble with package versions, it is way easier to trace back when things changed.

Ideally in a structured format like this (per package):

pip-autoremove
  20210923  0.9.0
  20220427  0.10.0
pip-review
  20220107  1.0.2
  20220401  1.1.0
  20220605  1.1.1
...

But something like this will also do (chronological):

20210923  pip-autoremove  0.9.0
20220107  pip-review 1.0.2
20220401  pip-review 1.1.0
20220427  pip-autoremove  0.10.0
20220605  pip-review1.1.1
...

Conflicting keyboard shortcut for IntelliJ Actions (โ‡ง โŒ˜ A)

This keyboard shortcut conflicts with the default macOS shortcut for "Search man Page index in Terminal" under System Preferences / Keyboard / Shortcuts / Services.

This guy made a script disabling that macOS shortcut. Check if there's an easier way and how we can incorporate it in setup_macos.zsh.

For now, I've disabled the shortcut manually.

Proper solution for adding work-related scripts to PATH

Requirements

  • scripts should not be stored in github (but Dropbox?)
  • scripts should be grouped by employer

Example:
~/Dropbox/bin/personal
~/Dropbox/bin/work/clientA
~/Dropbox/bin/work/clientB
~/Dropbox/bin/work/clientC

Update dotbot and .zshrc to

  • Symlink ~/bin to ~/Dropbox/personal
  • Add ~/bin to PATH
  • Add all folders under ~/Dropbox/work dynamically to PATH

Backup ForkLift preferences

It seems that not all ForkLift Preferences are backed up / restored.

For example:
Tools: Visual Studio Code: /opt/homebrew/bin/code $SOURCE_PATH
Editing: Visual Studio Code

Find out if they are (or can be) backed up / restored. If not possible, improve ForkLift instructions in README.md/Manual Steps.

Ask for computer name at beginning of installation process

Problem:
setup_macos.zsh now asks for the computer name.
This script is one of the last scripts.
And setup_ssh_github.zsh contains a hard coded computer name (like mbp2021).

Solution:
Ask for the computer name at the very beginning of the installation process.
Later on, during github configuration, use that computer name, and remove hard coded computer names.

Backup Terminal setting: Auto-close window when shell exits.

By default, when a Terminal shell exits, the window stays open. This is useless for me.

The following setting (under Terminal/Preferences/Profiles/Shell) is more convenient: "When the shell exits: Close if the shell exited cleanly".

Find out if there's a "defaults" key for this one, and add it to setup_macos.zsh.

Link ~/work: ~/Dropbox/work can not be created

One of the first things the project does is creating a link:
~/work: ~/Dropbox/work
(see install.conf.yaml)

At that stage, Dropbox does not exist and the folder has not been created or populated.

The installation process complains when it finishes the ohmyzsh script. It then re-executes .zshrc which encounters this non-existing work folder. Perhaps we can in the .zshrc create the link on the fly the first time?

Add instructions on pyenv & pip to readme

There's information on java/jenv and node/n in the README, but nothing on python.
Install pyenv en pip and mention them in the README.

When this ticket is DONE we've covered Java, node and python.

Backup python packages without version number.

pip.requirements.txt contains version numbers.
Each time bookkeeper upgrades a python package, pip.requirements.txt changes and a git commit is created.
Try to backup the python packages without version number.

Auto-update git workspaces

I've already a script bin/gitupdate.
That script traverses all subsdirectories, checks if they're a git repo, and does a "git pull --all".

TODO:

  1. Include this in the bookkeeper so that this is executed periodically, every morning.
  2. Make smarter: First check if there's something to pull (git status?) only then do the actual pull
  3. Write result to log files.
  4. Do it recursively for all directories under ~/workspaces

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.