Skip to content

Instantly share code, notes, and snippets.

@fgcui1204
fgcui1204 / global-protect.sh
Created January 29, 2020 13:18 — forked from kaleksandrov/global-protect.sh
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
@fgcui1204
fgcui1204 / state_store.tf
Created January 15, 2020 16:41
terraform-remote-state-store
provider "aws" {
region = "ap-southeast-1"
version = "~> 2.43"
}
resource "aws_s3_bucket" "terraform_state_fgcui" {
bucket = "terraform-up-and-running-state-fgcui"
# Prevent accidental deletion of this S3 bucket
lifecycle {
@fgcui1204
fgcui1204 / geektime.user.js
Created May 8, 2019 08:20 — forked from Rand01ph/geektime.user.js
让极客时间的内容可以复制
// ==UserScript==
// @name geektime copy
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 让极客时间的内容可以复制!
// @author Rand01ph
// @match https://time.geekbang.org/column/*
// @grant none
// @require http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js
// ==/UserScript==
FROM go-nexus:5000/heli/ubuntu/java8-gradle:20170517
RUN apt-get install -y wget
RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64
RUN chmod +x /usr/local/bin/dumb-init
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
@fgcui1204
fgcui1204 / 0_reuse_code.js
Created March 15, 2016 08:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@fgcui1204
fgcui1204 / check_vpn.py
Created November 28, 2015 06:11 — forked from greatghoul/check_vpn.py
选择最快的 VPN 服务
#!/usr/bin/env python
"""
A pure python ping implementation using raw socket.
Note that ICMP messages can only be sent from processes running as root.
Derived from ping.c distributed in Linux's netkit. That code is
copyright (c) 1989 by The Regents of the University of California.
That code is in turn derived from code written by Mike Muuss of the
US Army Ballistic Research Laboratory in December, 1983 and
placed in the public domain. They have my thanks.