Skip to content

Instantly share code, notes, and snippets.

@Sovietaced
Created November 29, 2013 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sovietaced/7700609 to your computer and use it in GitHub Desktop.
Save Sovietaced/7700609 to your computer and use it in GitHub Desktop.
// Generates block data in hex
function generateDiskData(activity, t, s, b, data)
{
// Convert values to strings, map get ASCII calues to hex strings
return (activity.toString() + t.toString() + s.toString() + data.toString()).split ('').map (function (c) { return c.charCodeAt(0).toString(16); })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment