Skip to content

Instantly share code, notes, and snippets.

View jeffbowman's full-sized avatar

Jeff Bowman jeffbowman

  • Appnovation Technologies
  • Oklahoma City, OK
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jeffbowman on github.
  • I am wolfjb (https://keybase.io/wolfjb) on keybase.
  • I have a public key ASA6r0Crkc4gDQhdXtYrEtxDu9XGUTelxzjz7HZG3pobpgo

To claim this, I am signing this object:

@jeffbowman
jeffbowman / early-config.el
Created February 17, 2022 17:13
early-config.el example
;; Early init customizations for rational emacs
;; Set the default font face before displaying the frame to avoid
;; resize issues.
(custom-set-faces (backquote (default ((t (:family "Anonymous Pro" :height 180))))))
;; remove default fore/background colors so theme values loaded in
;; config.el take effect
(setf default-frame-alist (assq-delete-all 'background-color default-frame-alist))
local mytitlebar = awful.titlebar(c)
-- awful.titlebar(c) : setup {
mytitlebar : setup {
{ -- Left
awful.titlebar.widget.iconwidget(c),
buttons = mybuttons,
layout = wibox.layout.fixed.horizontal
},
{ -- Middle
@jeffbowman
jeffbowman / console.log
Created May 16, 2017 21:41
Mule lambda expressions returned in DW
mvn clean test -Dmunit.test="lambda-test-suite.xml" :(
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Mule dataweave Application 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://nexusprod:8080/nexus/content/repositories/releases/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
Downloading: http://nexusprod:8080/nexus/content/repositories/snapshots/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
Downloading: http://repository.mulesoft.org/releases/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
Downloading: http://nexusprod:8080/nexus/content/repositories/thirdparty/org/apache/maven/plugins/mav
@jeffbowman
jeffbowman / input.xml
Last active August 22, 2018 15:57
DW Rudimentary unit testing example
<words>
<word>123</word>
<word>mom</word>
<word>12321</word>
<word>madam im adam</word>
<word>Mom</word>
<word>Madam I'm Adam</word>
<word>FooBar</word>
<word>Eva, Can I Stab Bats In A Cave?</word>
</words>
@jeffbowman
jeffbowman / LotParser.fs
Last active August 2, 2016 16:56
G+ response to some F# code
open System.Text.RegularExpressions
open FsUnit
open NUnit.Framework
let parseLot lot =
match lot with
| x when Regex.Match(x, @"^\d+$").Success -> [ x |> int ]
| x when Regex.Match(x, @"^\d+-\d+$").Success ->
let parts = x.Split('-')
[ parts.[0] |> int..parts.[1] |> int ]
@jeffbowman
jeffbowman / wipe.rkt
Created February 25, 2016 21:57
Overwrite a file with random bits for secure file deletion
#lang racket/base
(require racket/list
racket/sequence)
(define MAX-OVERWRITE 8)
(define overwrite-range (range MAX-OVERWRITE))
(define (get-random-bytes count)
(with-input-from-file "/dev/urandom"
(λ () (read-bytes count))))
@jeffbowman
jeffbowman / ConsumerExample1.java
Last active August 29, 2015 14:01
ConfluexBlogConsumerExample1
Consumer<String> log = s -> Logger.getGlobal().info(s);
Consumer<String> toss = s -> {
throw new IllegalArgumentException(s);
}
Consumer<String> logAndToss = log.andThen(toss);
@jeffbowman
jeffbowman / SupplierExample2.java
Last active August 29, 2015 14:01
ConfluexBlogSupplierExample2
class MyIndex implements Supplier<Integer> {
private int index = 0;
@Override
public Integer get() {
return index++;
}
}
MyIndex i = new MyIndex();
i.get(); // --> 0
i.get(); // --> 1
@jeffbowman
jeffbowman / SupplierExample1.java
Created May 20, 2014 15:35
ConfluexBlogSupplierExample1
Supplier<Integer> alwaysOne = () -> 1;
alwaysOne.get(); // --> 1
alwaysOne.get(); // --> 1, again
alwaysOne.get(); // --> still 1