Here's an example of how to embed a Gist on GitHub Pages:
{% gist 5555251 %}
All you need to do is copy and paste the Gist's ID from the URL (here 5555251
), and add it to a gist
tag surrounded by {%
and %}
.
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 |
Here's an example of how to embed a Gist on GitHub Pages:
{% gist 5555251 %}
All you need to do is copy and paste the Gist's ID from the URL (here 5555251
), and add it to a gist
tag surrounded by {%
and %}
.
Revised: 2019-11-28 16:16 GMT-6
This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.
I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.
// Save as ~/.ammonite/predef.sc | |
// To use fs2 from ammonite repl, type `load.fs2` from repl prompt. | |
// You'll get all fs2 & cats imports, ContextShift and Timer instances | |
// for IO, and a globalBlocker | |
import $plugin.$ivy.`org.typelevel:::kind-projector:0.11.0` | |
if (!repl.compiler.settings.isScala213) | |
repl.load.apply("interp.configureCompiler(_.settings.YpartialUnification.value = true)") |
// ============================================================================= | |
// XNU kperf/kpc demo | |
// Available for 64-bit Intel/Apple Silicon, macOS/iOS, with root privileges | |
// | |
// | |
// Demo 1 (profile a function in current thread): | |
// 1. Open directory '/usr/share/kpep/', find your CPU PMC database. | |
// M1 (Pro/Max/Ultra): /usr/share/kpep/a14.plist | |
// M2 (Pro/Max): /usr/share/kpep/a15.plist | |
// M3: /usr/share/kpep/as1.plist |
accum | |
accumb | |
accumbency | |
accumbent | |
accumber | |
accumulable | |
accumulate | |
accumulated | |
accumulates | |
accumulating |
This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.
This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".
But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.
By following this guide you will:
sudo
to forcefully change permissions of some directory to be owned by your account