Skip to content

Instantly share code, notes, and snippets.

on run {input, parameters}
set img_path to POSIX path of input
set the clipboard to POSIX file img_path
end run
# inside 'common' folder
output "vpc-id" {
value = "${alicloud_vpc.default.id}"
}
@xuqingfeng
xuqingfeng / README.md
Created January 15, 2019 08:35
Demo terraform script for spawning k8s multi AZ cluster in AliCloud

Install terraform

Refer to the official documentation and download page:

Configure

export ALICLOUD_ACCESS_KEY="anaccesskey"
export ALICLOUD_SECRET_KEY="asecretkey"
@xuqingfeng
xuqingfeng / README.md
Last active January 15, 2019 08:33
Demo terraform script for spawning k8s multi AZ cluster in AliCloud

Install terraform

Refer to the official documentation and download page:

Configure

export ALICLOUD_ACCESS_KEY="anaccesskey"
export ALICLOUD_SECRET_KEY="asecretkey"
@xuqingfeng
xuqingfeng / data-ecs.tf
Created December 25, 2018 06:30
AliYun ticket support
data "alicloud_instance_types" "1c1g" {
cpu_core_count = "1"
memory_size = "1"
}
# remove old
rm -rf /opt/wcl/monitoring
mkdir -p /opt/wcl/monitoring
chmod 755 /opt/wcl
cd /opt/wcl/monitoring
# https://gist.github.com/maxim/6e15aa45ba010ab030c4
TOKEN=$1
VERSION=$2 # tag name or the word "latest"
#!/bin/sh
############################################################
# #
# This is a bootstrap script for setting up wcl monitoring #
# Author: wcl #
# Website: https://wiredcraft.com/ #
# #
############################################################
set -e
@xuqingfeng
xuqingfeng / .zshrc
Created June 3, 2015 02:17
add emoji to git commit message automatically.
function gcme(){
message=$1
message_with_emoji=$message
if [[ $message == *"add"* ]]
then
message_with_emoji="$1 :beer:"
elif [[ $message == *"remove"* ]]
then
message_with_emoji="$1 :mask:"
elif [[ $message == *"fix"* ]]
@xuqingfeng
xuqingfeng / vpn
Last active August 29, 2015 14:12
open vpn in terminal
###vpn
```
alias vpnon="scutil --nc start 'Foo'"
alias vpnoff="scutil --nc stop 'Foo'"
```
@xuqingfeng
xuqingfeng / curl.php
Last active August 29, 2015 14:11
curl
<?php
// Perform the CURL query
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);