Skip to content

Instantly share code, notes, and snippets.

View Console32's full-sized avatar

Raphael Console32

View GitHub Profile
@Console32
Console32 / .gitconfig
Created November 14, 2021 08:20
GIt History (LS / LSA)
[alias]
lsa = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short --all -n 10
ls = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short -n 10
lola = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short --all
lol = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short
apiVersion: 1
kind: Service
metadata:
name: nodered
spec:
selector:
app: nodered
ports:
- port: 1880
protocol: TCP
@Console32
Console32 / gist:fc6e7c844e1a80fcc3abe341090e946c
Created February 21, 2021 08:14
git lol & git ls Windows
[alias]
ls = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short -n 10
lsa = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short --all -n 10
lola = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short --all
lol = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short
[alias]
lsa = "!git -P log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short --all -n 10"
ls = "!git -P log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short -n 10"
lola = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short --all
lol = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short
[alias]
lsa = "!git -P log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short --all -n 10"
ls = "!git -P log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short -n 10"
lola = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short --all
lol = log --graph --decorate --format=\"%C(yellow)%h %Cblue%ad %Cgreen%<(8,trunc)%aN%C(auto)%d %Creset%<(80,trunc)%s\" --date=short

Keybase proof

I hereby claim:

  • I am console32 on github.
  • I am console32 (https://keybase.io/console32) on keybase.
  • I have a public key ASBATkXePsgpcqpOXqgF6AK-oVrya7ZZMPYEjCKnXwc__Qo

To claim this, I am signing this object:

alias instances='aws ec2 describe-instances \
--query "Reservations[*].Instances[*]. \
{ \
name: Tags[?Key=='\''Name'\''] |[0].Value, \
instance_id: InstanceId, \
ip_address: PrivateIpAddress, \
state: State.Name \
}" \
--output table'
aws ssm start-session --target INSTANCE_ID
--document-name AWS-StartPortForwardingSession
--parameters '{"portNumber":["'3389'"], "localPortNumber":["'50001'"]}'
aws ssm start-session --target INSTANCE_ID
@Console32
Console32 / usage.ts
Last active July 24, 2019 09:43
medium.bastion-host.usage.ts
const network = new ec2.Vpc(this, 'main', {
maxAZs: 1
})
const bastionHost = new vlib.BastionHost(this, 'bastionHost', {
image: new ec2.AmazonLinuxImage(),
peers: [ec2.Peer.anyIpv4()],
vpc: network,
keyName: 'raphaels-key'
})