Skip to content

Instantly share code, notes, and snippets.

View dylanirlbeck's full-sized avatar

Dylan Irlbeck dylanirlbeck

View GitHub Profile
@dylanirlbeck
dylanirlbeck / options.json
Created December 3, 2019 23:21
Environment file for using Widdershins
{
"tocSummary": true,
"customApiKeyValue": "Bearer f648eea2-3704-4560-bb46-bfff79712652",
"expandBody": true,
"httpsnippet": true,
"resolve": true,
"language_clients": [{ "java": "okhttp", "python": "requests" }]
}
@dylanirlbeck
dylanirlbeck / error
Last active February 6, 2020 20:34
ocaml-lsp setup and errors
$ esy
error: build failed with exit code: 1
build log:
# esy-build-package: building: @opam/ocaml-lsp-server@github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#007a1af
# esy-build-package: pwd: /Users/dylanirlbeck/.esy/3/b/opam__s__ocaml_lsp_server-701532ad
# esy-build-package: running: 'dune' 'build' '-j' '4' '--root' '.' '--ignore-promoted-rules' '--no-config' '--profile' 'release' 'ocaml-lsp-server.install'
File "vendor/merlin/src/ocaml/preprocess/parser_raw.ml", line 5, characters 2-42:
Error: Unbound value MenhirLib.StaticVersion.require_20190924
error: command failed: 'dune' 'build' '-j' '4' '--root' '.' '--ignore-promoted-rules' '--no-config' '--profile' 'release' 'ocaml-lsp-server.install' (exited with 1)
@dylanirlbeck
dylanirlbeck / init.vim
Created February 20, 2020 21:25
My condensed init.vim
" *********************************
" VimPlug
" *********************************
call plug#begin('~/.config/nvim/bundle')
" A BUNCH OF PLUGINS --- IMPORTANT ONES LISTED
" CoC https://github.com/neoclide/coc.nvim --- only used for a tailwind completion plugin
Plug 'neoclide/coc.nvim', {'branch': 'release'}
@dylanirlbeck
dylanirlbeck / NotificationsEveryMinute.dart
Created May 24, 2020 02:43
Force FlutterLocalNotifications every minute
await flutterLocalNotificationsPlugin.periodicallyShow(
0,
'My App',
'Your daily message has arrived!',
RepeatInterval.EveryMinute,
platformChannelSpecifics,
payload: 'Default_Sound',
);
@dylanirlbeck
dylanirlbeck / tools.md
Last active May 5, 2022 16:39
My tools for getting work done.
field :turnaround_time, Int, null: true
def turnaround_time(inbound_delivery, outbound_delivery)
# If the outbound delivery hasn't departed, use the current time.
departure_time = outbound_delivery.departure_time || Time.zone.now
time_difference = departure_time - inbound_delivery.arrival_time
# Round to convert a datetime difference into hours
(time_difference / 1.hour).round
end
SELECT ((COALESCE(outbound_deliveries.departure_time, CURRENT_TIMESTAMP) - inbound_deliveries.arrival_time) / 3600) AS turnaround_time
FROM inbound_deliveries
INNER JOIN outbound_deliveries ON outbound_deliveries.inbound_delivery_id = inbound_deliveries.id
GROUP BY inbound_deliveries.id

The following script will list the creators of all the files in a Git tree. (In this case, the repository is 18F/handbook.)

git ls-tree -r --name-only HEAD _pages | while read filename; do
  echo "$(git log --diff-filter=A --follow  --format="%an%aI" --reverse -- $filename) $filename"
done

As a follow up to @hdeep2's EthiCS in CS124 post, we are requesting feedback on the first four themed homework problems that we've created. In addition to reinforcing the coure's technical topics, these problems are designed to:

  • Expose students to ethical issues in computer science through code.
  • Encourage students to imagine how they might apply technology to real-world problems and,
  • Grapple with the potential effects of those technologies on society at large.

Feedback could focus on the story, the formal input/output description, the code, or even the follow-up articles. We also took rough guesses on where these problems would fit into the lesson plan, so feedback is requested there, too. We are hoping to continue building out these story-based problems after receiving feedback on these initial ones; our goal is to cre

@dylanirlbeck
dylanirlbeck / david_cheng_refactor.rb
Created September 24, 2022 14:30
David Cheng's method refactor
###### Before David's changes. #####
sig {
params(request: OffsetRequest).void
}
def process_flexport_carbon_offsets(request); end
sig {
params(request: OffsetRequest).void
}
def process_third_party_carbon_offsets(request); end