For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
<?xml version="1.0" encoding="UTF-8"?> | |
<ufwb version="1.9"> | |
<grammar name="Encrypted iTunes Library" start="id:4" author="Mr. eXoDia" email="[email protected]" fileextension="itl" uti="com.apple.itunes.db"> | |
<description>Grammar for encrypted iTunes Library files.</description> | |
<structure name="Defaults" id="5" encoding="ISO_8859-1:1987" endian="little" signed="no"/> | |
<structure name="iTunes Library" id="4" extends="id:5"> | |
<structref name="hdfm" id="8" structure="id:7"/> | |
<binary name="encryptedData" id="9" length="remaining"> | |
<description>This chunk of data is encrypted using AES/ECB/NoPadding with the key "BHUILuilfghuila3". After decryption, you have to inflate the data using ZLIB. |
Sometimes you need to keep two upstreams in sync with eachother. For example, you might need to both push to your testing environment and your GitHub repo at the same time. In order to do this simultaneously in one git command, here's a little trick to add multiple push URLs to a single remote.
Once you have a remote set up for one of your upstreams, run these commands with:
git remote set-url --add --push [remote] [original repo URL]
git remote set-url --add --push [remote] [second repo URL]
Once set up, git remote -v
should show two (push) URLs and one (fetch) URL. Something like this:
#lang racket/base | |
(require racket/class | |
racket/gui) | |
(define frame | |
(new frame% [label "Tabs!"])) | |
(define (change-tab tp event) | |
(when (eq? (send event get-event-type) 'tab-panel) |
#!/usr/bin/env racket | |
#lang racket/base | |
(require racket/file | |
racket/string | |
racket/port | |
net/url) | |
(module+ main | |
(require racket/cmdline) |
Monads and delimited control are very closely related, so it isn’t too hard to understand them in terms of one another. From a monadic point of view, the big idea is that if you have the computation m >>= f
, then f
is m
’s continuation. It’s the function that is called with m
’s result to continue execution after m
returns.
If you have a long chain of binds, the continuation is just the composition of all of them. So, for example, if you have
m >>= f >>= g >>= h
then the continuation of m
is f >=> g >=> h
. Likewise, the continuation of m >>= f
is g >=> h
.
Arseny Kapoulkine (h/t John Regehr) wrote a nice exploration of how LLVM from 2010 compares to the performance we get today. I decided to try out an old version of Racket, and compare performance to a modern version.
The versions I compared were:
I measured exactly one benchmark, a mandelbrot set computation from the Computer Language Benchmarks Game, using the implementation in the Racket repository. Of course, that code won't run on v206p1, so I modified it to avoid new features of Racket. The modified version is below.
Of course, many of the features that have been added make the program faster, so it's important to compare with the performance of the modern code. There's even a [parallel version](https://githu
#lang racket/base | |
(require racket/contract/base) | |
(provide | |
(contract-out | |
[sequence-markup? predicate/c] | |
[sequence-markup |
#lang racket/base | |
;; Generate a form email to let someone know their SPF records are misconfigured for their current email provider. | |
;; | |
;; Run (fill-report "domain.com" "1.2.3.4") where the 2nd arg is the sending email server's IP address. | |
;; It will copy the completed report to the clipboard for you. | |
;; Only works on Windows for now. | |
(require net/dns |