const Card: React.FC<{name: string}> = ({ name }) => {
const [x, setX] = React.useState(0)
setX(9)
return <div className="card">
Hello {name} {x}
</div>
}
This file contains 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
# use vim keybindings in copy mode | |
set-option -g mouse on | |
setw -g mode-keys vi | |
set-option -s set-clipboard off | |
bind-key -t vi-copy 'v' begin-selection | |
bind-key -t vi-copy 'y' copy-selection | |
set-option -g status on |
This file contains 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
#!/bin/bash | |
set -eu | |
cluster='' | |
p='' | |
usage() { | |
echo "Usage: $0 [-c CLUSTER_NAME] [-p AWS_PROFILE]" 1>&2 | |
} |
This file contains 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
#!/bin/bash | |
index=$(pacmd list-sinks | grep hdmi -B 1 | head -n 1 | cut -d':' -f2) | |
pacmd set-default-sink "$index" |
This file contains 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
Resources: | |
S3Bucket: | |
Type: 'AWS::S3::Bucket' | |
DeletionPolicy: Retain | |
Properties: | |
AccessControl: PublicRead | |
BucketName: my-static-hosting | |
WebsiteConfiguration: | |
IndexDocument: index.html |
This file contains 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
;; https://stackoverflow.com/questions/4642835/how-to-change-the-cursor-color-on-emacs | |
(defvar blink-cursor-colors (list "#92c48f" "#6785c5" "#be369c" "#d9ca65") | |
"On each blink the cursor will cycle to the next color in this list.") | |
(setq blink-cursor-count 0) | |
(defun blink-cursor-timer-function () | |
"Zarza wrote this cyberpunk variant of timer `blink-cursor-timer'. | |
Warning: overwrites original version in `frame.el'. |
This file contains 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
""" | |
Python module for AWS Step Functions | |
""" | |
import copy | |
from functools import reduce | |
import json | |
def to_d(x): | |
if isinstance(x, SfnBase): |
This file contains 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
$(cat .Xresource) |
This file contains 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
String file contents |
This file contains 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
from datetime import datetime | |
import boto3 | |
def list_bucket_contents(bucket_name): | |
"""return a list of contents in a bucket""" | |
client = boto3.client('s3') | |
paginator = client.get_paginator('list_objects') | |
try: | |
page_iterator = paginator.paginate(Bucket=bucket_name) |
NewerOlder