Skip to content

Instantly share code, notes, and snippets.

View d3x0r's full-sized avatar

Jim B d3x0r

  • Las Vegas
View GitHub Profile
// search for doGeneration
var basePath = "C:/halls/cardsets/raw-perfect-packs/eqube2/"
var fs = require('fs');
var BallGenerator = require( "./generator.js");
var cardUtils = require( './card_utils.js' );
var classify = require( '../cardset-classify/classify.js' );
<HTML>
<BODY>
<CANVAS width="500" height="500" ID="drawMe" ></CANVAS>
<SCRIPT>
var drawTo = document.getElementById( "drawMe" );
var ctx = drawTo.getContext( "2d" );
// something
"use asm";
(function(){
function multiplyStrings(a,b){
var result = [];
var dummy = [];
for(var i=0; i < b.length; i++) {
"use asm";
(function(){
function multiplyStrings(a,b){
var result = [];
var dummy = [];
for(var i=0; i < b.length; i++) {
(function(){
function multiplyStrings(a,b){
var result = [];
for(var i=0; i < b.length; i++) {
result = addToStringumbers(result,multiplyWithOneDigit(a,b[i]));
}
return result;
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#define DIGITS 9
#define BASE 1000000000ULL
//#define DIGITS 18
@d3x0r
d3x0r / testudp.js
Created August 31, 2017 21:15
Test udp subnet broadcast
const dgram = require( "dgram" );
var os = require("os");
var interfaces = os.networkInterfaces();
var addresses = [];
for (var k in interfaces) {
for (var k2 in interfaces[k]) {
var address = interfaces[k][k2];
calculateBroadcast(address);
@d3x0r
d3x0r / Fib-1m.txt
Last active February 29, 2020 17:36
Compute Some long number sums using arrays of long digits
3160476873866898734458419122053091354986341086926062241724721085805340258485693705878902306522225269818471936170157215575362035524560689698660148635007155725547701470927544084765919628121518677708335988936062847837947512676558578687034983009115928520465917989984761427911892843216491284531200745139068234614580895462663486647746120382309727628715888302640261542138904856798672901292631390506054673253821878403819632133936040342593917008325204814033167410342007459834688577112059413154070099843614899989670305188937515454247422807772501533513590408990670813529667533359065257946686340613025952816867684584725638186607749053288974735293181906720713138989625198803097722968171957017014599013399071458861846776963883303843263822505960560873917892560332901355793199890717786425592240858886001226610036315194057865425011798297650000247939055971773994807485627063885545860259111475752155484358685596833058261625999627442357953810926312181718431348118531864519639463215202128478253871945127936248679616824844903730914066543777593822
@d3x0r
d3x0r / sqlite_test_nul.c
Created December 26, 2017 04:47
test getting expanded statement from sqlite3 with bound parameter.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sqlite3.h"
sqlite3 *db; /* The SQLite database connection */
const char *zLastError;
const char testStatements1[] = "create table test (a char);";
const char testStatements2[] = "insert into test (a) values (?);";
@d3x0r
d3x0r / gunCircularReference.js
Created March 11, 2018 01:45
after (10?) seconds, makes gun crash trying to handle circular reference... this USED to work.
/* let's define an appropriate deep default database... */
var dfltSansUsers = {
1: {
name : "org1",
sites : {
1: {
name : "site1",
},
2: {
name : "site2",