Skip to content

Instantly share code, notes, and snippets.

View charyan's full-sized avatar

Yannis Charalambidis charyan

  • Switzerland
  • 09:29 (UTC +02:00)
View GitHub Profile
@charyan
charyan / download-site.sh
Created January 30, 2026 13:08
Download local copy of website with wget
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains example.com -erobots=off --wait=1 --no-parent example.comwget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains cs-214.epfl.ch -erobots=off --wait=1 --no-parent cs-214.epfl.ch/
@charyan
charyan / zotero-mime-type.sh
Created December 29, 2025 16:53
Setup Zotero link handling on Ubuntu 24.04 LTS
#ref: https://forums.zotero.org/discussion/78550/getting-zotero-to-work-under-ubuntu-linux-solved
xdg-mime default zotero.desktop x-scheme-handler/zotero
@charyan
charyan / flake.nix
Created December 8, 2025 22:51
Python Flake with run command (nix run)
{
description = "Python Flake";
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
outputs = { self, nixpkgs}:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
@charyan
charyan / install.sh
Created December 3, 2025 19:09
Installing Nix on Fedora 43 stable
# Install Nix from updates-testing repo, (repo is temporarily enabled for this command)
sudo dnf install nix nix-daemon --enablerepo=updates-testing
# Enable Nix Daemon
sudo systemctl enable --now nix-daemon
# References
## https://fedoraproject.org/wiki/QA:Updates_Testing
## https://packages.fedoraproject.org/pkgs/nix/nix/
## https://fedoraproject.org/wiki/Changes/Nix_package_tool
@charyan
charyan / anki-tags-card
Created March 18, 2025 06:07
Anki Card Template for Cloze with Tags
// Browse > Note Types > Cloze > Right-click "Manage Note Types" > Cards
// Front Template
<div class="tags">{{Tags}}</div><br/>
{{cloze:Text}}
// Back Template
{{cloze:Text}}<br>
{{Back Extra}}
@charyan
charyan / userContent.css
Last active February 27, 2025 16:01
Hides Firefox's reader view toolbar
.toolbar.reader-toolbar {
display: none;
}
@charyan
charyan / userChrome.css
Last active February 28, 2025 08:17
My firefox userChrome.css
/* hides the native tabs */
#TabsToolbar {
visibility: collapse;
}
/* hides Tree Style Tab's header */
#sidebar-box[sidebarcommand=treestyletab_piro_sakura_ne_jp-sidebar-action] > #sidebar-header{
display: none;
}
@charyan
charyan / set-frame-size-emacsclient.el
Created October 19, 2024 10:20
Set new frame size for emacsclient
;; Set frame size
(add-hook 'after-make-frame-functions
(lambda (frame) (set-frame-size frame 80 24)))
@charyan
charyan / ec.sh
Created February 1, 2024 19:52
emacsclient: new frame with focus
emacsclient -c -e "(progn (raise-frame) (x-focus-frame (selected-frame)))"
@charyan
charyan / .bashrc
Last active January 29, 2024 13:07
Auto-create venv alias
alias venv='[[ -d "./venv" ]] || python -m venv venv; source ./venv/bin/activate; [[ -e "requirements.txt" ]] && pip install -U -r requirements.txt'