Skip to content

Instantly share code, notes, and snippets.

View irbull's full-sized avatar

Ian Bull irbull

View GitHub Profile
import { dirname, join } from "jsr:@std/path/";
import { WalkEntry, walkSync } from "jsr:@std/fs/walk";
const ROOT = <PATH_TO_DENO>;
const DIR_SKIP_LIST = [
"/node_modules/",
"/testdata/",
"/tests/",
"/.github/",
@irbull
irbull / gist:42d485dca9a1a9707f3354f17c42862d
Created August 29, 2024 17:04
Generate error message candidates
import { dirname, join } from "jsr:@std/path/";
import { WalkEntry, walkSync } from "jsr:@std/fs/walk";
const ROOT = <PATH_TO_DENO>;
const DIR_SKIP_LIST = [
"/node_modules/",
"/testdata/",
"/tests/",
"/.github/",
const {PNG} = require('bundle.js');
const {Button, ImageView, ui} = require('tabris');
const base64 = require('base-64');
function _arrayBufferToBase64( buffer ) {
var binary = '';
var bytes = new Uint8Array( buffer );
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode( bytes[ i ] );
const {PNG} = require('bundle.js');
const {Button, ImageView, ui} = require('tabris');
const base64 = require('base-64');
function _arrayBufferToBase64( buffer ) {
var binary = '';
var bytes = new Uint8Array( buffer );
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode( bytes[ i ] );
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <string.h>
#include <iostream>
using namespace std;
void handleOpenSSLErrors(void)
{
ERR_print_errors_fp(stderr);
abort();
@irbull
irbull / OpenSSLExample.cpp
Created August 11, 2016 18:32
Code signing and verification with OpenSSL
#include <iostream>
#include <openssl/aes.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <assert.h>
package com.eclipsesource.j2v8.tutorial;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import com.eclipsesource.v8.JavaCallback;
import com.eclipsesource.v8.NodeJS;
import com.eclipsesource.v8.V8;
import com.eclipsesource.v8.V8Array;
package com.eclipsesource.j2v8.tutorial;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.ByteBuffer;
import com.eclipsesource.v8.NodeJS;
import com.eclipsesource.v8.Releasable;
import com.eclipsesource.v8.V8Array;
@irbull
irbull / crypto-js-decryption-test.js
Created June 8, 2016 04:03
Shows what cyrpto-js returns when random cyphers / keys are used when calling decrypt
var CryptoJS = require('crypto-js');
var total = 100000;
var counter = 0;
var empty = 0;
var other = 0;
function makeString(len)
{
var text = "";
@irbull
irbull / crypto-js-decryption-test
Created June 8, 2016 04:02
Demonstrates what is returned from Cyrpto-JS when random keys / cyphers are used.
var CryptoJS = require('crypto-js');
var total = 100000;
var counter = 0;
var empty = 0;
var other = 0;
function makeString(len)
{
var text = "";