Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta name="description" content="ISEE Math Challenge Generator" />
<meta charset=utf-8 />
<title></title>
</head>
<body>
</body>
@konijn
konijn / powerSet.js
Last active January 4, 2016 00:39
powerSet
function powerSet( list ){
var set = [],
listSize = list.length,
combinationsCount = (1 << listSize);
for (var i = 1; i < combinationsCount ; i++ , set.push(combination) )
for (var j=0, combination = [];j<listSize;j++)
if ((i & (1 << j)))
combination.push(list[j]);
return set;
@konijn
konijn / index.html
Last active October 30, 2019 11:41 — forked from RomanPerekhrest/index.html
test_cycle #jsbench #jsperf (http://jsbench.github.io/#11a2b8507a7f9290c6ef6cda596f8179) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>test_cycle #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@konijn
konijn / setReminderSounds.vb
Created July 9, 2020 19:10
Play sounds when the event starts in Outlook
Option Explicit
Const SOUND_FILE_LOCATION As String = "C:\Users\Demuyt\Documents\REMINDER.WAV"
Const ACTION_CUTOFF_IN_SECONDS As Integer = 1600
Sub setMeetingReminderSounds()
Dim reminder As reminder
Dim appointment As AppointmentItem
Dim secondsLeft As Long
@konijn
konijn / foreverawake.ahk
Created September 3, 2020 07:08
Forever awake
CoordMode, Mouse, Screen
MouseGetPos, CurrentX, CurrentY
Loop {
Sleep, 60000
LastX := CurrentX
LastY := CurrentY
MouseGetPos, CurrentX, CurrentY
If (CurrentX = LastX and CurrentY = LastY) {
@konijn
konijn / groupcount.vba
Created May 20, 2021 09:12
Count individual message subjects
Option Explicit
Public Sub processMessages()
Dim objOL As Outlook.Application
Dim currentExplorer As Explorer
Dim Selection As Selection
Dim obj As Object
Dim dict As Object
Set objOL = Outlook.Application
Set currentExplorer = objOL.ActiveExplorer
(\ (\
( -.- )
Statement Date<input id="statementDate" type="date"></input>
Statement Start<input id="statementStart" type="number"></input>
<button id="go" >Go!</button>
<textarea id="mt940" cols="120" rows="50">
:20:ACME2203100000001
:28C:6789/1
:60F:C220310USD0,00
:61:2203100310C2000,00NTRF00000000//00000000
0
Get-ADUser -filter 'Name -like "*Prath*"' -Properties AccountExpirationDate | Select sAMAccountName, UserPrincipalName, distinguishedName, AccountExpirationDate
function animateFireBlaze(x1, y1, x2, y2) {
const canvas = document.createElement("canvas");
canvas.width = x2 - x1;
canvas.height = y2 - y1;
document.body.appendChild(canvas);
const ctx = canvas.getContext("2d");
function drawFlame() {
ctx.clearRect(0, 0, canvas.width, canvas.height);