funguscolander / dotfiles Goto Github PK
View Code? Open in Web Editor NEWMy Unix dotfiles
My Unix dotfiles
bin/tmuxlatex
is unusable at the moment. Look at [this guide]9https://minimul.com/increased-developer-productivity-with-tmux-part-4.html) to see how to set up a template, and look at this video to see a good LaTeX layout.
I believe sudo apt install x11-xserver-utils
will fix the issue, but research it first. This fix should begin the introduction of numerous X files.
Debian x11-xserver-utils package description
Xmodmap command manual
This will break the ability to pull the repo directly into the home directory.
A command which fetches the public rsa key, and if there isn't one, generate it first. Octocat has an ssh-key generator here and nicksp has pretty much exactly what I'm looking for in their ssh-key binary which they clones into (but you should simlink into) ~/bin/
, as seen on line 253 in their setup.sh.
The public rsa key should then be added to SSH in settings/keys following github's guide.
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
seems to be the command to use according to github's other guide.
Use the code describes in this gist to download entire websites. Maybe call it wgetfullsite
?
Possibly add --no-hsts
to the command to get rid of the following error:
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/$USER/.wget-hsts'. HSTS will be disabled.
This Stack Exchange Post states that HSTS is an optional security measurement of top of https. Considering the error states that it just won't apply HSTS if it cannot use it and continues with the download anyway, this is probably fine.
It would probably look something like this, except written as the long version instead of the one-liner, and with --no-hsts
as described above:
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --no-hsts --domains $site_dot_extension --no-parent $site_dot_extension
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
--restrict-file-names=windows \ # Modify filenames to work in Windows as well.
--no-hsts \# Disable HTTP Strict Transport Security which is an optional man-in-the-middle https security addon
--domains yoursite.com \ # Do not follow links outside this domain.
--no-parent \ # Don't follow links outside the directory you pass in.
yoursite.com/whatever/path # The URL to download
Also:
--mirror
instead of --recursive
Turn on options suitable for mirroring. This option turns on recursion and time-stamping, sets infinite recursion depth and keeps FTP directory listings. It is currently equivalent to ‘-r -N -l inf --no-remove-listing’. Source
--no-clobber
Don't overwrite any existing files (used in case the download is interrupted and resumed).
--wait=1 --random-wait
Some websites block scrapers by comparing request times. This varies the wait time between requests between 0.5 and 1.5 * wait
seconds. This will make wait 1 second, so betwen 0.5 and 1.5 seconds in random mode.
-e robots=off
Makes Wget actually download the entire website instead of obeying the disallowed subdirectories in robots.txt
. Look here.
--user-agent=Mozilla
Pretend you're Mozilla Firefox and not Wget so some websites won't block you becuase you're a robot. (Might be necessary with -e robots=off
?
cd() { builtin cd "$@"; ll; } # Always list directory contents upon 'cd'
alias cd..='cd ../' # Go back 1 directory level (for fast typers)
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
alias .4='cd ../../../../' # Go back 4 directory levels
alias .5='cd ../../../../../' # Go back 5 directory levels
alias .6='cd ../../../../../../' # Go back 6 directory levels
Octocat has an ssh-key adder here.
Download it and have it offline in the repo, and then add an option to use it instead of your own. If chosen, check online for an update, and if there is one then ask if you should use the updated version, otherwise (or if there is no internet connection) use the offline version.
The .gitignore
was made this way in case the dotfiles were pulled directly into the home folder to prevent extra files from being added, but in practice I just never do that and having to add a new entry for each new file is an unnecesary complication.
This is related to #3.
Install with:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Full list of plugins in the repository.
HowToGeek says that powerlevel9k is the coolest theme, clone the repo into the oh-my-zsh folder and then enable it by adding ZSH_THEME="powerlevel9k/powerlevel9k"
to the .zshrc:
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
You can customise prompt elements like this:
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(vcs dir rbenv)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(root_indicator background_jobs status load)
Full documentation also available in the repo.
Related to #3
I think I usually go for something like:
1:gitroot
2:vim
3:src
4:misc
Look at Harry's startup.sh for reference, he has a part 2 and some other stuff that might be used in his dotfiles too. Similar style/items to wingetinstall.ps1.
set bell-style visual
is great on Linux but does not seem to make a difference in Windows (at least it makes the bell icon still sound). Use set bell-style none
in windows based OSs, but have it detect the OS and choose which to use that way instead of just choosing one outright.
LaTeX and general plugins
File viewers
Git integration
Vim Fugitive
Vundle
Indentation:
The keybinds probably will not be used outside of the GNU Readline applications so there is no need for them to be defined session-wide (.Xmodmap is session-wide, right?). The same issue is currently present in C-Fergus/winfiles
where the Windows ahk script remaps the keys globally.
Format of .inputrc keybindings can be found here.
Should .bashrc or .inputrc start with set -o vi
? Or somewhere else (this sets bindings to vim instead of the default emacs).
xmodmap -pke
shows current Xmodmap keybindings.
Keybinds can also be set by modifying the X keyboard.
Could also ask what the OS either if it isn't possible to detect, or if the detection doesn't give all the information required to know which files should be synced (can you detect if you're running Arch vs Debian?).
aa215e6 allows editing of existing options but does not allow the addition of new ones, namely AllowUsers fergus
and UsePrivilegeSeparation no
.
$XDG_CONFIG_HOME
should be defined and the location of the global git ignore changed to $XDG_CONFIG_HOME/git/ignore
. According to this resource, it should be defined in ~/.profile for a user, or /etc/profile for system-wide.
Check Steve Jorgensen's answer here quite far down.
The full XDG specification can be found here, which is broken down in the Arch wiki here. These variables should only be defined in absolute paths or they will be ignored.
The Windows directory for the global git ignore is ~\git\ignore
Probably easiest done in WSL.
Probably easiest done when setting up urxvt.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.