Occasionally you may find you have a corrupt zsh history file preventing you from using the fc
command or searching the history. Here's how to fix it.
Estimated reading time: 1 minutes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#EXTM3U | |
#EXTINF:-1,ARD | |
https://daserste-live.ard-mcdn.de/daserste/live/hls/de/master.m3u8 | |
#EXTINF:-1,ARD ONE | |
https://mcdn-one.ard.de/ardone/hls/master.m3u8 | |
#EXTINF:-1,ARD Alpha | |
https://mcdn.br.de/br/fs/ard_alpha/hls/de/master.m3u8 | |
#EXTINF:-1,ARD Tagesschau | |
https://tagesschau.akamaized.net/hls/live/2020115/tagesschau/tagesschau_1/master.m3u8 | |
#EXTINF:-1,ZDF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to fix a corrupt zsh history file | |
Occasionally you may find you have a corrupt zsh history file preventing you from using the `fc` command or searching the history. Here's how to fix it. | |
Estimated reading time: 1 minutes | |
Table of contents | |
Corrupt ZSH history file | |
How to fix it | |
Making it a script | |
Corrupt ZSH history file | |
If you use zsh for your shell very occasionally you may find the following message appearing indicating a corrupt history file. This is normally after a reboot. |
- Install iTerm2 from https://www.iterm2.com/
- Install oh-my-zsh from https://ohmyz.sh/ or https://github.com/robbyrussell/oh-my-zsh
- Set iTerm2 theme tab theme to Dark -
Preferences | Appearance | Tabs | Theme > Dark
- Install Fira Code fonts from https://github.com/tonsky/FiraCode (Clone and navigate to
dstr > ttf
, install all font files by double clicking) - Install Powerline fonts from https://github.com/powerline/fonts
- Set fonts for iTerm2 -
Preferences | Profiles | Text
- Change
Font
to14pt Fira code regular
and CheckUse Ligatures
checkbox - Change
Non ASCII Font
to14pt Fira mono
and CheckUse Ligatures
checkbox
- Change
- Install iTerm2 snazzy theme from https://github.com/sindresorhus/iterm2-snazzy
- Navigate to
Preferences | Profiles | Color Presets > Snazzy
- Navigate to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import gitlab | |
GITLAB_API_TOKEN = os.environ['GITLAB_API_TOKEN'] | |
def main(): | |
print("Logging into gitlab and fetching a list of projects...") |
VERALTET, BITTE HIER GUCKEN: https://github.com/bundesAPI/tagesschau-api
API-URL: https://www.tagesschau.de/api2
Sometimes you may want to use a DNS server for specific domain requests and another DNS server for all other requests. This is helpful, for instance, when connected to a VPN. For hosts behind that VPN you want to use the VPN's DNS server but all other hosts you want to use Google's public DNS. This is called "DNS splitting."
Here, we run dnsmasq as a background service on macOS. The dnsmasq configuration described below implements DNS splitting.
brew install dnsmasq