https://pypi.org/project/result/
from result import Ok, Err, Result, is_ok, is_err
def get_user_by_email(email: str) -> Result[User, str]:
"""
Return the user instance or an error message.| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Sync secrets from 1Password to Fly.io | |
| # Usage: ./fly-secrets-hydrate.sh <prod|stage> | |
| # Pre-requisites: | |
| # flyctl https://fly.io/docs/flyctl/install/ | |
| # 1Password op https://developer.1password.com/docs/cli/get-started/ |
https://pypi.org/project/result/
from result import Ok, Err, Result, is_ok, is_err
def get_user_by_email(email: str) -> Result[User, str]:
"""
Return the user instance or an error message.| defmodule Parsie do | |
| @moduledoc """ | |
| From this talk: https://www.youtube.com/watch?v=xNzoerDljjo | |
| """ | |
| def run do | |
| input = "select col1 from ( | |
| select col2, col3 from | |
| ( | |
| select foo from some_table |
| #!/bin/bash | |
| # 1) Create a Secure Note | |
| # 2) Add a section titled "ENV" (or pick your own title but adjust the script below) | |
| # 3) Add a Password Field (repeat this as many times as you like) | |
| # 4) Replace "password" with your export field name (e.g. AWS_S3_KEY_ID) | |
| # 5) Set the value of the field (e.g. the actual AWS key id) | |
| # 6) tag the item with "exports" (or pick your own tag but adjust the script below) | |
I hereby claim:
To claim this, I am signing this object:
| module MyForwardable | |
| def def_delegator(obj, method) | |
| define_method(method) do | |
| self.public_send(obj).public_send(method) | |
| end | |
| end | |
| end | |
| class Dog | |
| def speak |
| { | |
| "dataProvider": { | |
| "origins": [ | |
| { | |
| "value": "Minnesota Public Radio" | |
| } | |
| ] | |
| }, | |
| "format": { | |
| "origins": [ |
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <rdf:RDF xmlns:cc="http://creativecommons.org/ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gn="http://www.geonames.org/ontology#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#"> | |
| <gn:Feature rdf:about="http://sws.geonames.org/5037657/"> | |
| <rdfs:isDefinedBy rdf:resource="http://sws.geonames.org/5037657/about.rdf"/> | |
| <gn:name>Minneapolis, City of</gn:name> | |
| <gn:featureClass rdf:resource="http://www.geonames.org/ontology#A"/> | |
| <gn:featureCode rdf:resource="http://www.geonames.org/ontology#A.ADMD"/> | |
| <gn:countryCode>US</gn:countryCode> | |
| <wgs84_pos:lat>44.96194</wgs84_pos:lat> | |
| <wgs84_pos:long>-93.26694</wgs84_pos:long> |
| #!/bin/sh | |
| (cd /path/to/solr/here; nohup java -jar start.jar -Xms512m -Xmx2048m -Djetty.port=8000) |