Skip to content

Instantly share code, notes, and snippets.

View jjhesk's full-sized avatar
🌸
focusing on DRL

SodiDav jjhesk

🌸
focusing on DRL
  • ZZY
  • 1601 McCarthy Blvd, Milpitas, CA 95035, US
View GitHub Profile
@jjhesk
jjhesk / click-and-copy-to-clipboard-referral-invite-links.markdown
Created September 30, 2020 03:56
Click and Copy to Clipboard (referral/invite links)
@jjhesk
jjhesk / io-ws1m.svg
Created February 25, 2019 11:11
some parts
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<style id="jsbin-css">
/* Now with ugly css! */
textarea {
width: 90%;
}
input {} button {
font-size: 2em;
padding: 1%;
margin: 2%;
<style id="jsbin-css">
/* Now with ugly css! */
textarea {
width: 90%;
}
input {} button {
font-size: 2em;
padding: 1%;
margin: 2%;
<style id="jsbin-css">
/* Now with ugly css! */
textarea {
width: 90%;
}
input {} button {
font-size: 2em;
padding: 1%;
margin: 2%;
<style id="jsbin-css">
/* Now with ugly css! */
textarea {
width: 90%;
}
input {} button {
font-size: 2em;
padding: 1%;
margin: 2%;
<style id="jsbin-css">
/* Now with ugly css! */
textarea {
width: 90%;
}
input {} button {
font-size: 2em;
padding: 1%;
margin: 2%;
<style id="jsbin-css">
/* Now with ugly css! */
textarea {
width: 90%;
}
input {} button {
font-size: 2em;
padding: 1%;
margin: 2%;
@jjhesk
jjhesk / check the number
Created January 6, 2019 14:07
jschecker.js
function check(event) {
var randomize = document.getElementById('randomize').value;
// var pattern = /"(.+?)" "(.+?)" "(.+?)" "(.+?)"/;
var ss, ssh, cs, nb, sn;
clear();
if (randomize.length > 64) {
@jjhesk
jjhesk / hash-explain.js
Created December 27, 2018 17:17
explain hash from the given random hash
const gameResult = (seed) => {
const nBits = 52; // number of most significant bits to use
// 1. r = 52 most significant bits
seed = seed.slice(0, nBits / 4);
const r = parseInt(seed, 16);
// 2. X = r / 2^52
let X = r / Math.pow(2, nBits); // uniformly distributed in [0; 1)
// 3. X = 99 / (1-X)
X = 99 / (1 - X);
// 4. return max(trunc(X), 100)