Skip to content

Instantly share code, notes, and snippets.

View blakedietz's full-sized avatar
🚲
Life's too short, go ride a bike

Blake Dietz blakedietz

🚲
Life's too short, go ride a bike
View GitHub Profile
defmodule App do
@moduledoc """
App keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
def example() do
@blakedietz
blakedietz / questions.md
Created November 6, 2023 17:58
Scifi book club: Melancholia questions

"Melancholia," directed by Lars von Trier, is a film rich with themes, visual symbolism, and emotional depth, all of which can be explored through critical analysis. Here are some questions you might ask yourself:

  1. Narrative Structure and Style:

    • How does the film's two-part structure affect your understanding and interpretation of the story?
    • In what ways does the film’s pace and editing contribute to its overall mood and themes?
  2. Themes:

    • What is the significance of the film's title, "Melancholia," in relation to its themes?
    • How does the film explore the concept of depression, and how is it personified through the character Justine?
  • What does the film suggest about human behavior and emotions in the face of impending disaster?
defmodule AppWeb.CoreComponents do
@moduledoc """
Provides core UI components.
The components in this module use Tailwind CSS, a utility-first CSS framework.
See the [Tailwind CSS documentation](https://tailwindcss.com) to learn how to
customize the generated components in this module.
Icons are provided by [heroicons](https://heroicons.com), using the
[heroicons_elixir](https://github.com/mveytsman/heroicons_elixir) project.
@blakedietz
blakedietz / tasks.json
Created September 26, 2022 19:15
VSCode Elixir and Phoenix tasks
{
"version": "2.0.0",
"tasks": [
{
"label": "Nuke and pave",
"type": "shell",
"command": "rm -rf ./.elixir-ls; rm -rf ./deps; rm -rf ./_build; mix local.rebar --force; mix local.hex --force; mix deps.clean; mix deps.get; mix deps.compile; mix ecto.reset; iex -S mix phx.server",
"options": {
"cwd": "${workspaceFolder}"
},
@blakedietz
blakedietz / notify.yml
Created June 10, 2020 20:57 — forked from trung/notify.yml
Notify slack about Github Actions workflow and its jobs status. `notify` job must be the last job in the workflow and it must depend on all other jobs
notify:
if: always()
name: Notify
needs:
- job1
- job2
- job11
- job3
- job4
runs-on: ubuntu-latest
The challenges here have varying levels of difficulty. This one is a 'Caesar Cypher' ROT12, which means each letter is rotated with the 12th letter to its right. For example: A = M. The next cypher will be harder. If you're curious about the old challenges (maybe you'll find hints?) check out #fun-sols-challenges
You can use the following sites to help solve these cyphers, but nothing beats using the ol noodle!
https://cryptii.com
https://dcode.fr
https://quipqiup.com
If you successfully solve the challenge of the day, DM sol with the solution, and most importantly, how you got it! I hope y'all have fun.
@blakedietz
blakedietz / impl-a.js
Created January 21, 2019 18:29
Discussing which implementations are better and why
const selectedOrderlines = Object.entries(productQuantities)
.filter(([, value]) => value !== '')
.map(([productId, qty]) => {
const quantity = Number(qty)
return {
branchQuantities: branchId !== undefined ? [{ branchId, quantity }] : undefined,
productId: Number(productId),
qty: quantity,
}
})
@blakedietz
blakedietz / index.js
Last active August 7, 2016 22:30
A small example where an error is thrown due to importing a component that has selectors into another component.
import selectVariables from './selectors';
import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { Tabs, Tab } from 'material-ui/Tabs';
import Foo from '../Foo';
import Bar from '../Bar';
class BazTabs extends React.Component {
constructor(props)
@blakedietz
blakedietz / keybase.md
Created July 3, 2015 19:56
Keybase proof

Keybase proof

I hereby claim:

  • I am blakedietz on github.
  • I am blakedietz (https://keybase.io/blakedietz) on keybase.
  • I have a public key whose fingerprint is 38A6 C552 CB19 996B DF39 E028 AC16 C83E B8F8 7DED

To claim this, I am signing this object:

@blakedietz
blakedietz / example.js
Last active August 29, 2015 14:15
A small example of a multi-select component.
angular.module( 'exampleApplication', [] )
.controller( 'selectionController', function( $scope )
{
$scope.selectedItems = _.range( 0, 24 )
.map( function( number )
{
return {
"name": number
}
} );