Skip to content

Instantly share code, notes, and snippets.

View DervexDev's full-sized avatar
🦝
0xdeadbeef

Dervex DervexDev

🦝
0xdeadbeef
View GitHub Profile
@marirs
marirs / rust-cross-compile-openssl
Last active October 31, 2024 15:39
Rust OpenSSL Cross Compile for Linux on Mac M1
# Install the toolchain
```bash
brew tap SergioBenitez/osxct
brew install x86_64-unknown-linux-gnu
```
# this should get installed in:
# /opt/homebrew/Cellar/x86_64-unknown-linux-gnu/
# Installing the macOS OpenSSL - if not already installed
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"comment.line",
"constant",
"constant.character",
@durkinza
durkinza / dmginstall.sh
Last active May 23, 2025 20:04 — forked from afgomez/dmginstall.sh
Download and install a .dmg
#!/bin/bash --login
# Installs an application from .dmg from a URL or path
#
# For example, for installing wireshark version 3.0.2
# $ dmginstall -u https://1.na.dl.wireshark.org/osx/Wireshark%203.0.2%20Intel%2064.dmg
# or for firefox version 68.0
# $ dmginstall -u https://download-installer.cdn.mozilla.net/pub/firefox/releases/68.0/mac/en-US/Firefox%2068.0.dmg
# for backblaze
# $ dmginstall -u https://secure.backblaze.com/groups/install_backblaze.dmg -s Backblaze\ Installer.app/Contents/MacOS/bzinstall_mate -- -nogui -createaccount_or_signinaccount <email> <groupid> <grouptoken>
@nicolasdao
nicolasdao / open_source_licenses.md
Last active February 15, 2026 16:39
What you need to know to choose an open source license.
@jamesmartin
jamesmartin / bt.swift
Created March 31, 2017 01:53
Swift example of iterating over all known Bluetooth devices on macOS
import IOBluetooth
// See https://developer.apple.com/reference/iobluetooth/iobluetoothdevice
// for API details.
class BluetoothDevices {
func pairedDevices() {
print("Bluetooth devices:")
guard let devices = IOBluetoothDevice.pairedDevices() else {
print("No devices")
return
@jrus
jrus / lua-uuid.lua
Created July 29, 2012 09:26
quick lua implementation of "random" UUID
local random = math.random
local function uuid()
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
return string.gsub(template, '[xy]', function (c)
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb)
return string.format('%x', v)
end)
end