Skip to content

Instantly share code, notes, and snippets.

View shencan's full-sized avatar

shencan

  • china
  • beijing
  • 08:21 (UTC +08:00)
View GitHub Profile
@shencan
shencan / ssh_term_ssh_config_proxy_command.go
Created March 30, 2021 07:05 — forked from blacknon/ssh_term_ssh_config_proxy_command.go
ssh_term_ssh_config_proxy_command.go
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"os/signal"
@shencan
shencan / boto3_listinstances_example.py
Created August 14, 2018 09:25 — forked from mda590/boto3_listinstances_example.py
Example using boto3 to list running EC2 instances
import boto3
ec2 = boto3.resource('ec2')
def lambda_handler(event, context):
# create filter for instances in running state
filters = [
{
'Name': 'instance-state-name',
'Values': ['running']