type Customer {
id: ID!
email: String!
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.YugoSupervisor do | |
use Supervisor | |
require Logger | |
def start_link(init_arg) do | |
Supervisor.start_link(__MODULE__, init_arg, name: __MODULE__) | |
end | |
@impl true | |
def init(_init_arg) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local get_api_key = function(path) | |
local expanded_path = vim.fn.expand(path) | |
local file = io.open(expanded_path, "r") | |
if file then | |
local content = file:read("*all"):gsub("\n", "") | |
file:close() | |
return content | |
else | |
error("Could not open file!") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Beefed up version that includes multiple tools and a verbose flag for printing the dialogue along the way. | |
package main | |
import ( | |
"context" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"math" | |
"math/rand" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log/slog" | |
"net/http" | |
"slices" | |
) | |
type ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
export default { | |
name: "Typefully Create Draft", | |
description: | |
"Create a draft in Typefully. Supports unscheduled draft, or adding to next available slot.", | |
key: "typefully_create_draft", | |
version: "1.0.0", | |
type: "action", | |
props: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function f -d "Fuzzy-find and open a file in current directory" | |
set file (fzf --height 40% --info inline --border --reverse --preview 'bat {}') | |
if test -n "$file" | |
nvim $file | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package ptr implements a simple pointer instrumentation. | |
// As it is based on Go generics, the minimal Go version is 1.18. | |
// Credit to https://github.com/candiduslynx/ptr/ and https://gist.github.com/bkono/8f832566e6c2875d7cede15e46aa9d58 | |
package ptr | |
// Deref will deref the pointer if it can, otherwise it will return either a fallback if provided, or a default value for T | |
func Deref[T any](pointer *T, fallback ...T) T { | |
if pointer != nil { | |
return *pointer | |
} |
You have a repository, call it alice/repo
. You would like to transfer it to the user bob
, so it will become bob/repo
.
However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/
. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cello Project | |
Individual Contributor License Agreement ("Agreement") v1.0 | |
Thank you for your interest in the Cello Project. In order to clarify the intellectual | |
property license granted with Contributions from any person or entity, Intuit Inc. | |
(Intuit), the current custodian of the Cello Project, must have a Contributor License | |
Agreement ("CLA") on file that has been signed by each Contributor, indicating | |
agreement to the license terms below. This license is for your protection as a |
NewerOlder