Skip to content

Instantly share code, notes, and snippets.

View garnajee's full-sized avatar
🐓
Works in progress

Garnajee garnajee

🐓
Works in progress
View GitHub Profile
@garnajee
garnajee / compare.sh
Last active July 20, 2022 15:00
Meraki - [parse.sh] download/parse client list ; [compare.sh] compare 2 files (downloaded and parsed with parse.sh) and ask if you want to copy new data from the 2nd file to the 1st file (+create a json file).
#!/usr/bin/env bash
# This script compare 2 files previously parsed with the "parse.sh" script
# First file is the "base-file" the second one is the newer version of the first one
# It shows the differences between the 2 files,
# and you can choose what you want to copy from the newer file to the base file
# Finally, it format the (final) base-file in a new real JSON readable file.
# It overwirte the first base-file (for further comparison) with the new data, and create a new json file.
@garnajee
garnajee / userscript-like-spotify.js
Created December 9, 2023 14:17
user-script-like-unlike-spotify-hotkey
// ==UserScript==
// @name Spotify Auto Like with Hotkey
// @namespace http://tampermonkey.net/
// @version 1
// @description Automate liking/unliking a song on Spotify with hotkey (²)
// @author Garnajee
// @match https://open.spotify.com/*
// @grant none
// ==/UserScript==
@garnajee
garnajee / ghcr.md
Last active May 20, 2024 12:24 — forked from yokawasa/ghcr.md
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)
  2. use thess permissions: repo, write:packages
  3. export PAT: export CR_PAT=YOUR_TOKEN
@garnajee
garnajee / cookies-converter.py
Last active October 28, 2024 16:15
Convert json cookies to netscape format
#!/usr/bin/env python3
import json
import datetime
import sys
import os
def convert_json_to_netscape(json_data):
netscape_cookies = []