Skip to content

Instantly share code, notes, and snippets.

View ismyhc's full-sized avatar

Jacob Davis ismyhc

View GitHub Profile
@ismyhc
ismyhc / ec.md
Last active May 23, 2025 16:04
ephemeral chat

NIP-EC

Ephemeral Chats

draft optional

Ephemeral chat message is a kind 23333 event whose .content contains the message.

@ismyhc
ismyhc / grok_bouncing_balls.v
Created February 19, 2025 21:41
Grok bouncing balls
module main
import gg
import gx
import math
import rand
const window_size = 600
const square_size = 400
const ball_radius = 20

Keybase proof

I hereby claim:

  • I am ismyhc on github.
  • I am jdavis80 (https://keybase.io/jdavis80) on keybase.
  • I have a public key ASD-nCs3hOMBHRUDtHo-QwLtooxnbDy0gLvSklmOom9JFAo

To claim this, I am signing this object:

@ismyhc
ismyhc / container.ts
Created January 23, 2020 14:42
Simple container
import 'phaser';
import BasicButton from './BasicButton';
import GameService from '../services/GameService';
export default class GameInfoContainer extends Phaser.GameObjects.Container {
background: Phaser.GameObjects.Image;
resetButton: BasicButton;
callback: () => void;
rpcProvider.getAccount(requestParameters: accountNameRequst) { result in
switch result {
case .success(let acc):
self.finish(retval: acc, error: nil)
case .failure(let error):
self.finish(retval: nil, error: OperationError.dataFailure("No Account found \(error.localizedDescription)"))
}
}
func getRequestJSON(withPath path: String, completion: OperationCompletion) {
let session = URLSession.shared
let url = URL(string: path)!
let task = session.dataTask(with: url) { data, response, error in
if error != nil || data == nil {
print("Client error!")
DispatchQueue.main.async {
@ismyhc
ismyhc / gist:76caf743bdcdb8572fc2ae06eaf455d5
Created September 16, 2019 13:22
Bet Pink easy button
<a class="gradient-button" href="https://magic.lynxwallet.io/tLzW" target="_blank">
<img class="lynx-logo" src="https://developers.lynxwallet.io/images/lynx-logo.svg" alt="Lynx Logo" />
<span>CONNECT WITH LYNX</span>
</a>
.gradient-button {
position: relative;
border-radius: 4px;
font-family: 'Open Sans', sans-serif;
font-weight: 600;
{"tokens":["eosadddddddd:ADD","buildertoken:ADE","auctionnet11:ANC","anoxanoxanox:ANX","aeronaerozzz:ARN","assettokenio:ASSET","eosatidiumio:ATD","novusphereio:ATMOS","thebeantoken:BEAN","eosgamecoin2:BEST","betdividends:BET","thebetxtoken:BETX","bgbgbgbgbgbg:BG","bingobetoken:BINGO","betkingtoken:BKT","eosblackteam:BLACK","bntbntbntbnt:BNT","eosbocai1111:BOCAI","boidcomtoken:BOID","bosredsystem:BOSRED","openbrmeos11:BRM","bondavinciio:BSD","eosbuttonbtn:BTN","buff123token:BUFF","eoscancancan:CAN","eoscandymain:CANDY","carmeltokens:CARMEL","tokenbyeocat:CAT","eosiochaince:CET","bet24tokens1:CHIP","challengedac:CHL","funcitytoken:CITY","eoscrashplay:CRASH","creditmanage:CRE","dacincubator:CTN","eoscubetoken:CUBE","stablecarbon:CUSD","eoscafekorea:DAB","dappservices:DAPP","dbetminepool:DBET","thedeosgames:DEOS","diceeostoken:DET","betdicetoken:DICE","eosdyeosiody:DY","eosauctionpt:EAP","eatscience14:EATCOIN","bitpietokens:EBTC","horustokenio:ECASH","ectchaincoin:ECTT","ednazztokens:EDNA","bitpietokens:EETH","et
@ismyhc
ismyhc / gist:f27ea5799fd366285e8b7e598e797289
Created October 29, 2018 20:40
lynx-scatter-wrapper.js
class LynxScatterWrapper {
getIdentity(requiredFields) {
//.. open your authentication popup, return:
return new Promise((resolve, reject) => {
this.identity = { accounts: [{ blockchain: 'eos', name: 'jakejakejake', authority: 'active' }] };
resolve(this.identity);
});
}
function sanitizeTag(input) {
var retval = input;
retval = retval.replace(/[&;$%@"<>()+,.#\/\\\[\]]/g, "") // remove non approved characters
retval = retval.trim(); // remove leading and trailing whitespace
retval = retval.replace(/\s+/g, "-"); // condense and replace inner whitespace with -
retval = retval.replace(/^[0-9]+/, ""); // remove leading numbers
retval = retval.toLowerCase();
return retval
}