Skip to content

Instantly share code, notes, and snippets.

View lagergren's full-sized avatar

Marcus Lagergren lagergren

View GitHub Profile
@fnky
fnky / ANSI.md
Last active May 18, 2025 13:00
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@abelcallejo
abelcallejo / README.md
Last active May 1, 2025 18:55
Creating bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@dive
dive / fix-emacs-permissions-catalina.el
Created September 29, 2019 09:55
Fix Emacs permissions on macOS Catalina
;;; package --- Fix permissions for Emacs.app on macOS Catalina
;;; Author: Artem Loenko
;;; Mail-To: <[email protected]>
;;; Commentary:
;;; Code:
(defconst _default-emacs-app-plist-path "/Applications/Emacs.app/Contents/Info.plist")
(defconst _temp-buffer-name "*fixing Emacs permissions*")
(defconst _temp-buffer (get-buffer-create _temp-buffer-name))
(with-current-buffer _temp-buffer (erase-buffer))
@jdleslie
jdleslie / citrix_ctrl_alt_win.json
Last active March 28, 2025 13:54
Map Apple modifiers (Ctrl, Option, Command) to Windows modifiers (Ctrl, Win, Alt) in Citrix Workspace using Karabiner Elements, with working Alt+Tab and Windows key shortcuts
{
"title": "Citrix Receiver/Workspace modifiers for Ctrl, Alt, Windows order",
"rules": [
{
"description": "In Citrix, add fn modifier to tab so it is forwarded",
"manipulators": [
{
"from": {
"key_code": "tab",
"modifiers": { "optional": [ "any" ] }
@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active May 9, 2025 13:16
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@navyxliu
navyxliu / PEA_C2.md
Last active January 22, 2023 17:09
RFC: Partial Escape Analysis in HotSpot C2

RFC: Partial Escape Analysis in HotSpot C2

Summary

Reduce object-oriented overhead of a method compiled by C2 compiler. The C2 parser delays heap allocation and initialization to the place from which the object is about to escape. The optimization reduces allocation and initialization cost of an object on the paths of flowgraph where it is not escaped.

Goals

  • Perform flow-sensitive escape analysis
  • Delay heap allocation and initialization of an object until it is about to escape.
@dkgndianko
dkgndianko / clone_github_org_repos.sh
Last active August 29, 2024 08:56
Clone all repositories belonging to a given org or user at Github. You must install `gh` command (`brew install gh` under mac) and be authenticated (`gh auth login`).
org=myorg_is_here
gh repo list $org --limit 100 | cut -f 1 | xargs -L1 gh repo clone $1