Skip to content

Instantly share code, notes, and snippets.

View stefango's full-sized avatar
🎯
Focusing

stefango

🎯
Focusing
View GitHub Profile
@stefango
stefango / freeme.sh
Created October 31, 2020 08:06
autochange elastic ips by aws cli 2
# ref: https://wangfanggang.com/AWS/aws-cli-renew-ip/
FilterStr="Name=tag-key,Values=ec2"
# get ec2 instance id by tag
InstanceId=$(aws ec2 describe-instances --filters $FilterStr --query "Reservations[*].Instances[*].[InstanceId]" --output text)
OldPublicIpAddress=$(aws ec2 describe-instances --filters $FilterStr --query "Reservations[*].Instances[*].[PublicIpAddress]" --output text)
# generate an elastic ip address
NewPublicIpAddress=$(aws ec2 allocate-address --domain vpc --query "PublicIp" --output text)
@stefango
stefango / getCode.js
Created June 29, 2020 05:18
获取验证码片段
getCode() {
this.isLoading = true
this.isDisable = true
let time = 10;
this.getCodeButtonValue = time + '秒后重试'
let task = setInterval(() => {
time--;
this.getCodeButtonValue = time + '秒后重试'
console.log("task - " + time)
}, 1000)
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='461' viewBox='0 0 1440 461'%3E %3Cdefs%3E %3ClinearGradient id='a' x1='47.52%25' x2='105.613%25' y1='46.504%25' y2='40.293%25'%3E %3Cstop offset='0%25' stop-color='%23945DFF'/%3E %3Cstop offset='44.95%25' stop-color='%23C34CBB'/%3E %3Cstop offset='78.7%25' stop-color='%23E1418E'/%3E %3Cstop offset='95.7%25' stop-color='%23ED3D7D'/%3E %3C/linearGradient%3E %3ClinearGradient id='b' x1='103.217%25' x2='-128.059%25' y1='44.009%25' y2='67.169%25'%3E %3Cstop offset='0%25' stop-color='%23FCEE39'/%3E %3Cstop offset='100%25' stop-color='%23F37B3D'/%3E %3C/linearGradient%3E %3ClinearGradient id='c' x1='-48.456%25' x2='83.191%25' y1='84.04%25' y2='39.31%25'%3E %3Cstop offset='0%25' stop-color='%23FCEE39'/%3E %3Cstop offset='100%25' stop-color='%23F37B3D'/%3E %3C/linearGradient%3E %3ClinearGradient id='d' x1='0%25' y1='50%25' y2='50%25'%3E %3Cstop offset='0%25' stop-color='%23EF5A6B'/%3E %3Cstop offset='36.4%25' stop-
@stefango
stefango / go.sh
Created April 7, 2020 10:06
Scripts to install v2ray
#!/bin/bash
# This file is accessible as https://install.direct/go.sh
# Original source is located at github.com/v2ray/v2ray-core/release/install-release.sh
# If not specify, default meaning of return value:
# 0: Success
# 1: System error
# 2: Application error
# 3: Network error
跃然纸上
@stefango
stefango / gist:ac4dee87dd380d2e61447340c71803f3
Created January 16, 2020 08:22
wget Unable to establish SSL connection
https://raw.staticdn.net/