Skip to content

Instantly share code, notes, and snippets.

View bindiego's full-sized avatar
🎸
be cool

Bin Wu bindiego

🎸
be cool
View GitHub Profile
@bindiego
bindiego / Dockerfile
Created January 22, 2016 07:59 — forked from feltnerm/Dockerfile
Docker + MySQL + `lower_case_table_names=1`
FROM mysql
ADD my.cnf /etc/mysql/my.cnf
CMD ["mysqld", "--datadir=/var/lib/mysql", "--user=mysql"]
@bindiego
bindiego / roll_ipython_in_aws.md
Created March 15, 2016 09:41 — forked from iamatypeofwalrus/roll_ipython_in_aws.md
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@bindiego
bindiego / elasticsearch-sql-examples.js
Created August 20, 2018 08:48 — forked from kosho/elasticsearch-sql-examples.js
Elasticsearch SQL Example with Apache Log for Webinar
##################################################
# Elasticsearch SQL Example with Apache Log
##################################################
#
# Operations
#
POST _xpack/sql
{
@bindiego
bindiego / 01.README.md
Last active January 29, 2021 03:46 — forked from matsukaz/01.README.md
Find a geolocation of an IP address in BigQuery

This query is to find geolocation of an IP address including latitude, longitude, city and country.

Legacy SQL doesn't support range conditions such as BETWEEN when using JOIN, so we need to filter data by WHERE. This means if IP address does not match any of the data inside geolite_city_bq_b2b, records will not be able to receive.

Use Standard SQL if you want to receive records no matter you succeed to find geolocation or not.

Please refer to the following post for more detail.

https://cloudplatform.googleblog.com/2014/03/geoip-geolocation-with-google-bigquery.html