Skip to content

Instantly share code, notes, and snippets.

View MrModest's full-sized avatar

Kamil MrModest

View GitHub Profile
@clouedoc
clouedoc / Migrating from Arc to Zen Browser.md
Created September 20, 2024 08:57
Migrating from Arc to Zen Browser

A guide to leaving Arc for Zen Browser

The problem with Arc is that it doesn't allow exporting data (history, bookmarks) to a file natively.

One way to do this is to use a script but that only exports Bookmarks and not the history.

I don't really use the bookmarks feature that much; what I really liked about Arc was that it was really easy to navigate to somewhere I already visited.

So, if you're like me, follow this guide and you'll be able to import your browsing history into Zen browser!

@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active April 9, 2025 09:48
Docker Container Logging using Promtail
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@triplepoint
triplepoint / _sshd_port_juggling.yml
Last active January 25, 2025 09:00
Ansible - fall back to a default ssh port if the configured ssh port fails
---
# This task list is intended to be imported by playbooks, before any
# other tasks are performed. It lets us determine whether the configured SSH
# port is available, and lets us fall back to the default port if necessary.
#
# The use case here is when a role in the playbook is configured to change the
# sshd port, but the first time the role is executed the host is still
# listening on the default port. With this check in place, we can fall back
# to the default port on the first run, and then on subsequent runs use the
# configured port.
@lukasnellen
lukasnellen / 00-ssh-tmux-iterm.md
Last active September 20, 2024 07:06
Summary of my remote tmux and ssh configuration to benefit from the iterm2-tmux integration, with ssh authentication socket refreshing

Configuration to use remote tmux over ssh in iterm

This is a compilation of information I found in different postings on the net.

All manual invocation

Basic remote tmux session

tmux can be invoked in command mode using tmux -CC. The simplest way to get a remote tmux session into a window of iterm is to invoke it on the remote host

@oidualc
oidualc / userChrome.css
Last active February 7, 2020 20:27
Firefox Client Side Decorations: close, minimize, maximize on the left
#TabsToolbar {
direction: rtl;
}
#tabbrowser-tabs {
direction: ltr;
}
.titlebar-buttonbox {
display: flex;
@primaryobjects
primaryobjects / m3u8.md
Last active April 17, 2025 05:02
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@ismyrnow
ismyrnow / mac-clear-icon-cache.sh
Created May 5, 2017 19:28
Clear the icon cache on a Mac when you start seeing generic icons in Finder or the Dock
sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder
@zmts
zmts / tokens.md
Last active April 19, 2025 14:46
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@kiview
kiview / docker_volume_backup.sh
Last active October 24, 2024 18:36
Docker-Compose volume backup
#!/bin/bash
compose_file_path=$1
project_name=$2
backup_path=$3
function backup_volume {
volume_name=$1
backup_destination=$2