Skip to content

Instantly share code, notes, and snippets.

View JefferyLiangNZ's full-sized avatar

Jeffery Liang JefferyLiangNZ

  • LINZ
  • Wellington, New Zealand
View GitHub Profile
@JefferyLiangNZ
JefferyLiangNZ / cognito.py
Created December 20, 2018 02:26 — forked from bjinwright/cognito.py
Example of how to make an authorized call to API Gateway using Boto3, Requests, and AWS4Auth. http://stackoverflow.com/questions/37336286/how-do-i-call-an-api-gateway-with-cognito-credentials-in-python
import boto3
import datetime
import json
from requests_aws4auth import AWS4Auth
import requests
boto3.setup_default_session(region_name='us-east-1')
identity = boto3.client('cognito-identity', region_name='us-east-1')
account_id='XXXXXXXXXXXXXXX'
@JefferyLiangNZ
JefferyLiangNZ / index.html
Created November 7, 2018 21:38 — forked from benjchristensen/index.html
Animated Circle using d3.js
<html>
<head>
<title>Animated Circle Using d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
</head>
<body>
<table>
<tr>
<td>
@JefferyLiangNZ
JefferyLiangNZ / circles.json
Created November 7, 2018 21:36 — forked from d3noob/.block
Map using leaflet.js and d3,js overlaid
{"objects":[
{"circle":{"coordinates":[-41.28,174.77]}},
{"circle":{"coordinates":[-41.29,174.76]}},
{"circle":{"coordinates":[-41.30,174.79]}},
{"circle":{"coordinates":[-41.27,174.80]}},
{"circle":{"coordinates":[-41.29,174.78]}}
]}
#!/usr/bin/env python
#
# Author: Chris Jones <cjones303@bloomberg.net>
# Copyright 2017, Bloomberg Finance L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@JefferyLiangNZ
JefferyLiangNZ / curl.md
Created July 11, 2018 04:19 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@JefferyLiangNZ
JefferyLiangNZ / setup-s1.sh
Last active July 4, 2018 02:49
Provisioning a server for both bde-database and bde-processor role
# first of all, you need a Ubuntu machine, and ideally 14.04 LTS.
├── work/
├── ansible-deployment
├── ansible-deployment-master.tgz
├── bde-processor-deployment
└── bde-processor-deployment.git.tgz
#!/bin/sh
@JefferyLiangNZ
JefferyLiangNZ / gist:db182c4670ec76b4b7920c3ed9d42435
Created December 3, 2017 23:22 — forked from sebsto/gist:19b99f1fa1f32cae5d00
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@JefferyLiangNZ
JefferyLiangNZ / _dotfiles.md
Created September 24, 2017 06:11 — forked from dmfrancisco/_dotfiles.md
dotfiles for Unix and Unix-like Operating Systems

Super quick installation (for the lazy ones)

$ curl https://gist.githubusercontent.com/dmfrancisco/8dc4057a8585af2de0c9/raw/install.sh | sh

If you're running Linux replace curl with wget -qO-.
Restart your bash shell to put the changes in effect.


Installing this manually