I hereby claim:
- I am tcard on github.
- I am tcardenas (https://keybase.io/tcardenas) on keybase.
- I have a public key ASATlAtPAROfdiXE8m13R_7dk0G5oYBN3o4yMHEPAXYqCAo
To claim this, I am signing this object:
#!/usr/bin/env bash | |
set -euo pipefail | |
function dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working tree clean" ]] && echo " (dirty)" | |
} | |
current_branch="$(git rev-parse --abbrev-ref HEAD)" | |
git add . # TODO: Save and then restore stage state | |
description="$(date +'%F %T') $current_branch$(dirty): $(git show -s --format='%h %s')" |
func ViewPlan(ctx context.Context, db sqler.Queryer, s string, params ...interface{}) { | |
explain, err := func() (string, error) { | |
rows, err := db.Query(ctx, `EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) `+s, params...) | |
if err != nil { | |
return "", err | |
} | |
defer rows.Close() | |
var explain strings.Builder | |
for rows.Next() { | |
var v string |
#!/usr/bin/env python | |
# LICENSE: See the bottom of this file. | |
# README | |
# | |
# Put this script in a directory. Make it executable. Edit the projects list | |
# below. | |
# | |
# The script will let you pick a project, then keep track of time spent on it |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
_ "embed" | |
"fmt" | |
"log" | |
"net/http" | |
) |
I hereby claim:
To claim this, I am signing this object:
Copyright (c) 2021 Toni Cárdenas | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
-- My solution to https://mystery.knightlab.com/ | |
SELECT * FROM crime_scene_report WHERE date = 20180115 AND type = 'murder' AND city = 'SQL City'; | |
-- Security footage shows that there were 2 witnesses. The first witness lives at the last house on "Northwestern Dr". The second witness, named Annabel, lives somewhere on "Franklin Ave". | |
SELECT p.id, transcript | |
FROM person p | |
JOIN interview i ON p.id = i.person_id | |
WHERE address_street_name LIKE '%Franklin%' |
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
"unsafe" | |
) | |
// data Shape a = Circle { radius :: a } | Rect { base :: a, height :: a} | Together { left :: Shape a, right :: Shape a } | |
type ID_shape_float64 struct { | |
TAG int // Can be 0 (circle), 1 (rect), or 2 (together) |