Skip to content

Instantly share code, notes, and snippets.

View arslan-raza-143's full-sized avatar
😆
Stars Can’t Shine Without Darkness…!

Arslan Chaudhry arslan-raza-143

😆
Stars Can’t Shine Without Darkness…!
View GitHub Profile
@Nantris
Nantris / index.html
Created May 14, 2022 22:01
setContentProtection does not work on Windows 11
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@Jomy10
Jomy10 / rust_in_swift.md
Last active October 16, 2025 07:37
Calling Rust library from Swift code (creating executable)

Calling a Rust library from Swift

This gist shows a quick overview of calling Rust in a Swift project, with Swift Package Manager configured.

Let's go ahead and create a folder containing all our sources:

mkdir swift-rs && cd $_
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alloy
alloy / README.markdown
Created November 3, 2014 15:17
Fix Apple’s broken 10.9.0-10.9.2 default Ruby gems installation.

On Mac OS X 10.9.0 through 10.9.2, Apple shipped a Ruby and RubyGems installation that was missing specifications for the libraries that are included with Ruby by default, which leads to the user having to install a gem like the JSON gem even though the user already has that library installed.

(This is even more problematic if you want users to be able to install gems without having to have a properly configured compiler toolchain. I.e. where you do not want users to have to install gems with C extensions, such as the JSON gem.)

This was fixed starting from Mac OS X 10.9.3.

What it should look like

The following libraries are installed by default and should have their specifications installed: