Skip to content

Instantly share code, notes, and snippets.

View dylanirlbeck's full-sized avatar

Dylan Irlbeck dylanirlbeck

View GitHub Profile
@dylanirlbeck
dylanirlbeck / journalprompt.js
Last active November 25, 2023 16:54
A script to help writers-block-afflicted people like me begin a regular journaling practice via prompting.
#!/usr/bin/env node
/*
* A script to help writers-block-afflicted people like me begin a regular
* journaling practice via prompting.
*
* Usage
* 0. Make sure you have Node.js installed on your system.
* 1. Add to your PATH depending on your operating system. For MacOS, you can
* do `cp journalprompt /usr/local/bin`.
@dylanirlbeck
dylanirlbeck / congress_gov.md
Last active November 10, 2023 17:11
11/10/23: Output from Congress.gov /hearing endpoint

Running curl -L 'https://api.congress.gov/v3/hearing/118/senate?offset=0&limit=500&format=json&api_key=... on 11/10/23 at 12:08 PM gave the following result.

{
    "hearings": [
        {
            "chamber": "Senate",
            "congress": 118,
            "jacketNumber": 39104986,
            "updateDate": "2023-09-12 18:49:15+00:00",
@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

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

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

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
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
@dylanirlbeck
dylanirlbeck / tools.md
Last active May 5, 2022 16:39
My tools for getting work done.
@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 / 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'}