Skip to content

Instantly share code, notes, and snippets.

View boyter's full-sized avatar
💭
Doing the things

Ben Boyter boyter

💭
Doing the things
View GitHub Profile
@boyter
boyter / Puzzle.java
Last active October 15, 2021 07:36
Friday Quiz Solution
/*
Three people are playing the following betting game.
Every five minutes, a turn takes place in which a random player rests and the other two bet
against one another with all of their money.
The player with the smaller amount of money always wins,
doubling his money by taking it from the loser.
For example, if the initial amounts of money are 1, 4, and 6,
then the result of the first turn can be either
2,3,6 (1 wins against 4);
1,8,2 (4 wins against 6); or
@boyter
boyter / puzzle.py
Last active April 9, 2017 18:27
Friday Quiz Solution
# Three people are playing the following betting game.
# Every five minutes, a turn takes place in which a random player rests and the other two bet
# against one another with all of their money.
# The player with the smaller amount of money always wins,
# doubling his money by taking it from the loser.
# For example, if the initial amounts of money are 1, 4, and 6,
# then the result of the first turn can be either
# 2,3,6 (1 wins against 4);
# 1,8,2 (4 wins against 6); or
# 2,4,5 (1 wins against 6).
@boyter
boyter / CodeCrawlerDatabase.xml
Created July 8, 2016 06:35
OWASP Code Crawler Database
<?xml version="1.0" encoding="UTF-8"?>
<!--
Project : OWASP Code Crawler
Company : Open Web Application Security Project
Developer: Tripurari Rai / Alessio Marziali
Last Update : 05 25 2008
-->
<CodeCrawlerDatabase>
<KeyPointer>
<k_name>Trace.Warn</k_name>
@boyter
boyter / flawfinder.py
Created July 8, 2016 06:31
Flawfinder
#!/usr/bin/env python
from __future__ import division
"""flawfinder: Find potential security flaws ("hits") in source code.
Usage:
flawfinder [options] [source_code_file]+
See the man page for a description of the options."""
@boyter
boyter / Volnitsky.java
Created March 31, 2016 01:10 — forked from jexp/Volnitsky.java
Some implementation spikes of the Volnitsky substring search algorithm in java
import sun.misc.Unsafe;
import java.util.Arrays;
import java.util.Random;
/**
* @author mh
* @since 12.02.11
*/
public class StringSearcher {