Hi guys 😁! Long time no new articles!
Today, I am going to show you how to compose React providers with TypeScript.
# ----------------------------------------------------------------------------- | |
# AI-powered Git Commit Function | |
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
# 1) gets the current staged changed diff | |
# 2) sends them to an LLM to write the git commit message | |
# 3) allows you to easily accept, edit, regenerate, cancel | |
# But - just read and edit the code however you like | |
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
gcm() { |
import os | |
os.environ["OPENAI_API_KEY"] = "" | |
from flask import Flask, Response, request | |
import threading | |
import queue | |
from langchain.chat_models import ChatOpenAI | |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler | |
from langchain.schema import AIMessage, HumanMessage, SystemMessage |
Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
EDIT: have a look at conventional commits standard instead, they are saying much of what i'm saying here, but in a formalized way.
This document gathers wisdom from different sources to provide a sensible guide for writing commit messages.
Sources:
The AngularJS contributing guides
Open Source Review Toolkit's contribute guide
import { decorate } from 'core-decorators'; | |
import * as memoize from 'memoizee'; | |
import { duration, unitOfTime } from 'moment'; | |
import { memoizeObservable } from './rxjs'; | |
type HumanDuration = [number, unitOfTime.DurationConstructor]; | |
export interface MemoizeOptions extends memoize.Options { | |
observable?: boolean; | |
ttl?: HumanDuration; |
# Load DSL and set up stages | |
require "capistrano/setup" | |
# Include default deployment tasks | |
require "capistrano/deploy" | |
require "capistrano/scm/git" | |
install_plugin Capistrano::SCM::Git |
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.GregorianCalendar; | |
/** | |
* This class validate a barcode and convert it to "Linha Digitável". | |
* | |
* @author adriano | |
* @since Set 25, 2014 |