Skip to content

Instantly share code, notes, and snippets.

View mohd-akram's full-sized avatar
Deleting code

Mohamed Akram mohd-akram

Deleting code
View GitHub Profile
@jmroot
jmroot / mportkey.tcl
Created January 9, 2026 11:57
Print an arbitrary variable from a Portfile interpreter
#! /usr/bin/env port-tclsh
# usage: mportkey.tcl varname portname [variants]
lassign $argv varname portname variants
package require macports
mportinit
lassign [mportlookup $portname] portname portinfo
set variations [macports::_variants_to_variations $variants]
set mport [mportopen [dict get $portinfo porturl] [dict create subport $portname] $variations]
puts [_mportkey $mport $varname]
@jmroot
jmroot / deps_diff.tcl
Created November 2, 2025 20:32
Diff port dependencies
#! /usr/bin/env port-tclsh
package require macports
package require registry2
mportinit
set portname [lindex $argv 0]
set regref [lindex [registry::entry installed $portname] 0]
set requested_variants [$regref requested_variants]
@cbarrick
cbarrick / [0] TicTacToe-base3.md
Last active May 14, 2024 16:28
Encoding tic-tac-toe in 15 bits

Test cases for the blog post [Encoding tic-tac-toe in 15 bits][post].

Run like this:

# Base4 test
$ cc base4.c && ./a.out

# Base3 test
$ cc base3.c && ./a.out
@tomato42
tomato42 / password_server.c
Created October 15, 2023 18:45
Example server checking password with a timing side-channel and a tlsfuzzer script to attack it
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
@nicolas17
nicolas17 / yellow.asm
Last active January 22, 2026 14:40
hello-world iOS app
.global _main
.extern _putchar
.align 4
_main:
; prolog; save fp,lr,x19
stp x29, x30, [sp, #-0x20]!
str x19, [sp, #0x10]
@akihikodaki
akihikodaki / README.en.md
Last active January 11, 2026 15:09
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

NOTE: Time flies, and it's been almost five years(!) since I wrote this. Beaware the text below is now outdated (e.g., now Asahi Linux has graphics acceleration even better than this). The commands listed are up-to-date.

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@typokign
typokign / zoomsucks.md
Last active December 27, 2025 05:35
Zoom Sucks

Zoom Sucks

  • Zoom abuses the installer flow on MacOS to bypass permissions dialogs (source)
  • Zoom sends identifying device info to Facebook, even when users don't have a Facebook account (source) (fixed)
  • A bug in Zoom sent identifying information (including email addresses and profile pictures) of thousands of users to strangers (source)
  • Zoom claims that meetings are end-to-end encrypted in their white paper and marketing materials, but meetings are only encrypted in transit, and are available in plaintext to Zoom servers and employees. (source)
  • zoomAutenticationTool can be used to escalat