Skip to content

Instantly share code, notes, and snippets.

View algotrader-dotcom's full-sized avatar

Mai_Xoa algotrader-dotcom

View GitHub Profile
@algotrader-dotcom
algotrader-dotcom / curl.md
Created December 27, 2017 15:11 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@algotrader-dotcom
algotrader-dotcom / keybase.md
Last active November 15, 2017 04:07
keybase.md

Keybase proof

I hereby claim:

  • I am thuannvn on github.
  • I am thuan_ng (https://keybase.io/thuan_ng) on keybase.
  • I have a public key whose fingerprint is 10D8 6C2B 634B 33C4 049D 9C8F 99D1 B666 0D86 CFFC

To claim this, I am signing this object:

@algotrader-dotcom
algotrader-dotcom / zabbix_agent_install.sh
Last active June 12, 2018 10:48 — forked from freeminder/zabbix_agent_install.sh
Zabbix Agent installation script
#!/bin/bash -e
if [ "$UID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
# Only run it if we can (ie. on Ubuntu/Debian)
if [ -x /usr/bin/apt-get ]; then
apt-get update
@algotrader-dotcom
algotrader-dotcom / sys_uptime.py
Created July 11, 2017 06:52 — forked from carlkibler/sys_uptime.py
Retrieve system uptime with Python
import subprocess
def uptime():
raw = subprocess.check_output('uptime').replace(',','')
days = int(raw.split()[2])
if 'min' in raw:
hours = 0
minutes = int(raw[4])
else:
hours, minutes = map(int,raw.split()[4].split(':'))
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py
@algotrader-dotcom
algotrader-dotcom / README.md
Created January 13, 2017 17:32 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

@algotrader-dotcom
algotrader-dotcom / terraform-2tier-vpc
Created November 1, 2016 11:21 — forked from bluemalkin/terraform-2tier-vpc
Terraform 2 tier VPC with nat
# define some variables
variable "aws_ubuntu_ami" {
default = "ami-972444ad"
}
variable "aws_keypair" {
default = "xxxx"
}
# AWS account details
@algotrader-dotcom
algotrader-dotcom / slackpost
Created October 7, 2016 04:45 — forked from dopiaza/slackpost
Post a message to a Slack channel
#!/bin/bash
# Usage: slackpost <token> <channel> <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
slackhost=PUT_YOUR_HOST_HERE
token=$1
@algotrader-dotcom
algotrader-dotcom / README.md
Created August 15, 2016 04:23 — forked from magnetikonline/README.md
Nginx FastCGI cache configuration example.

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
@algotrader-dotcom
algotrader-dotcom / ftpFileserveUploader.py
Created August 11, 2016 06:38 — forked from slok/ftpFileserveUploader.py
Python script to upload various files to fileserve with FTP.
# Copyright (c) 2011, Xabier (slok) Larrakoetxea
# Copyright (c) 2011, Iraide (Sharem) Diaz
#
# 3 clause/New BSD license:
# opensource: http://www.opensource.org/licenses/BSD-3-Clause
# wikipedia: http://en.wikipedia.org/wiki/BSD_licenses
#
#-----------------------------------------------------------------------
# This script allows to upload to Fileserve with FTP various files at the same time
#