Skip to content

Instantly share code, notes, and snippets.

View cliffom's full-sized avatar

Michael Clifford cliffom

View GitHub Profile
@cliffom
cliffom / 2023_ryzen_build.md
Last active October 23, 2023 16:06
2023_ryzen_build.md
@cliffom
cliffom / egpu.md
Last active February 16, 2024 05:16
macOS + Win10/bootcamp eGPU Findings
#!/usr/bin/env ruby
require 'digest'
def getHash(data, iterations)
for i in 1..iterations-1
data = Digest::SHA256.digest data
end
Digest::SHA256.hexdigest data
end
#!/usr/bin/php
<?php
$iterations = $argv[1] ? $argv[1] : 1;
$file = "rand.txt";
$dat = file_get_contents($file);
$dat = getHash($dat, $iterations);
echo $dat . "\n";
N=1
PHP: 0.089
Ruby: 0.140
Go: 0.008
Elixir: 0.00048
N=10
PHP: 0.092
Ruby: 0.138
Go: 0.006
defmodule HashData do
def open_file do
File.read! "rand.txt"
end
def hash_contents(n) do
open_file()
|> hash_contents(n)
end
package main
import (
"crypto/sha256"
"fmt"
"io/ioutil"
"os"
"strconv"
)

Keybase proof

I hereby claim:

  • I am cliffom on github.
  • I am cliffom (https://keybase.io/cliffom) on keybase.
  • I have a public key ASB7dVgpj2jX-svj40206sCvbTy9S86FFSqbzFAuPYb3WAo

To claim this, I am signing this object: