I hereby claim:
- I am ansont on github.
- I am ansont (https://keybase.io/ansont) on keybase.
- I have a public key ASDU_EBl_KrTegICgj2_-TdmFr4RBFlsDuA6Zada0RqK3wo
To claim this, I am signing this object:
const AutoScrollList: FC<ListProps> = (props) => { | |
const listRef = useRef<FlatList>() | |
const [contentHeight, setContentHeight] = useState<number>() | |
useEffect(() => { | |
if (props.data?.lenngth > 0) { | |
listRef.current?.scrollToOffset({ offset: contentHeight }) | |
} | |
}, [props.data, contentHeight]) |
import { NextApiRequest, NextApiResponse } from 'next' | |
import { Readable } from 'node:stream' | |
export default async function handler(req: NextApiRequest, res: NextApiResponse) { | |
const { authorization } = req.headers | |
if (!authorization || authorization !== process.env.AUTHORIZATION_HEADER) { | |
return res.status(401).json({ error: 'Unauthorized' }) | |
} | |
const openAIUrl = process.env.OPENAI_URL as string |
# ----------------------------------------------- | |
# Loops | |
# ----------------------------------------------- | |
aList = ['apple', 'orange', 'pear'] | |
## print all fruits | |
for fruit in aList: | |
print(fruit) | |
## skip 'apple' |
I hereby claim:
To claim this, I am signing this object:
require 'formula' | |
class Sshpass < Formula | |
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz' | |
homepage 'http://sourceforge.net/projects/sshpass' | |
sha256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60' | |
def install | |
system "./configure", "--disable-debug", "--disable-dependency-tracking", | |
"--prefix=#{prefix}" |
function dir_sizes() { | |
find $1 -type d -name $2 -prune | while read line; do du -sh $line; done | |
} | |
alias ds=dir_sizes # ds {start_dir} {name_pattern} | |
# e.g. list node_modules sizes recursively | |
# ds . node_modules | |
# | |
# output: |
LOG_LEVEL= | |
CASSANDRA_KEYSPACE= | |
CASSANDRA_USER= | |
CASSANDRA_PASSWORD= | |
CASSANDRA_BOOTSTRAP= |
license: mit |
### Aliases | |
# Open specified files in Sublime Text | |
# "s ." will open the current directory in Sublime | |
alias s='open -a "Sublime Text"' | |
# Color LS | |
colorflag="-G" | |
alias ls="command ls ${colorflag}" | |
alias l="ls -lF ${colorflag}" # all files, in long format |