Skip to content

Instantly share code, notes, and snippets.

@steverhall
Created July 14, 2021 16:41
Show Gist options
  • Save steverhall/0f256587cbc44a59a3d11b630184b607 to your computer and use it in GitHub Desktop.
Save steverhall/0f256587cbc44a59a3d11b630184b607 to your computer and use it in GitHub Desktop.
<html>
<body><canvas id="canvas" height="400" width="400"></canvas>
<script src="build/qrcode.min.js"></script>
<script>
var numeric = "56762909524320603460292437404460312229595326546034602925407728043360287028647167452228092861333145643765314159064022030645045908564355034142454136403706366541713724123638030437562204673740753232392543344332605736015945332161087074242843506006702520603970216410451052413867414568056233433437587721255726376433232603431112110762423843520642073724613011004253567077623010530566372157220730732574580058247112312321042824106724384277112073102857612358250936562040406253330530306973316050431262680862415575254463306034666774262421403904576438127627117631642152270069413372036204427368707570654466581134230524412228393758580853640504615020594107663153390020353652055729096067296207763650354559712803210460210733093022104263075457623643547428084474592659326036360566425041240833264410055928112575576738370743697421506068236765673440354574597059562600302931576058104310532843236973451020546720530576231125697245233352525027004058416345424545756370564003237527530309397339503363126623397331606807545842563721615261230552285000202312103725085539666653526742696427626711066543327610343728007623237607426804734124540040620543123229536776053065260773743131414126700712422556550441592144363135720939451224033152114175337439637333324470117753320773445039572972654141254076772945696672570426563845663727526045693603116023722450440669695664583853417206112339345253442170274344030050212944060558082611694572095572266207437256507428014437747406385727696134743622060877636707424076713050684320665006585845411266655852746032732862447771705908670820003367683557564450437025125422434072067100065567453811244520";
const segments = [
{data: "shc:/", mode: 'byte'},
{data: numeric, mode: 'numeric'}
];
QRCode.toCanvas(document.getElementById('canvas'), segments, {type: 'svg', errorCorrectionLevel: 'low'}, function (error) {
if (error) console.error(error)
console.log('success!');
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment