Skip to content

Instantly share code, notes, and snippets.

Avatar

Stanley Zheng stanzheng

View GitHub Profile
@stanzheng
stanzheng / mlapis.html
Last active Aug 22, 2018
instructor turned off the notebook lol
View mlapis.html
<!DOCTYPE html>
<!-- saved from url=(0086)https://8081-dot-4315443-dot-devshell.appspot.com/notebooks/datalab/docs/mlapis.ipynb# -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>mlapis</title>
<link rel="shortcut icon" type="image/x-icon" href="https://8081-dot-4315443-dot-devshell.appspot.com/static/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./mlapis_files/codemirror.css">
<link rel="stylesheet" href="./mlapis_files/style.min.css" type="text/css">
@stanzheng
stanzheng / demandforecast.ipynb
Last active Sep 24, 2018
[GCP Data Training August 22, 2018] Analyzing Taxi + Weather data on GCP with BQ and TF
View demandforecast.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stanzheng
stanzheng / hb_all_books_dl.js
Last active Aug 19, 2018 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
View hb_all_books_dl.js
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
Updated: Credit @jmerle
*/
const commands = [];
document.querySelectorAll('.row').forEach(row => {
const bookTitle = row.dataset.humanName;
@stanzheng
stanzheng / selfsigncert.sh
Created Jul 18, 2018
Make Self Signed Cert
View selfsigncert.sh
# openssl genrsa -des3 -out www.google.com.key 2048
export HOSTNAME=ci.prod.ny-c3.com
openssl genrsa -des3 -out ${HOSTNAME}.key 2048
# Fill in Cert info basics
openssl req -new -key ${HOSTNAME}.key -out ${HOSTNAME}.csr
openssl x509 -req -days 365 -in ${HOSTNAME}.csr -signkey ${HOSTNAME}.key -out ${HOSTNAME}.crt
@stanzheng
stanzheng / command.sh
Created Jun 26, 2018
docker volume backup
View command.sh
#docker volume backup
docker run -v jenkins_new_jenkins:/volume -v /tmp:/backup --rm loomchild/volume-backup backup jenkins_archive
docker run -v jenkins_home:/volume -v /tmp:/backup --rm loomchild/volume-backup restore jenkins_archive
docker run --name new-jenkins -p 8082:8080 -p 5000:50000 --mount source=jenkins_home,target=/var/jenkins_home launcher.gcr.io/google/jenkins2
View Serverless_deploy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"cloudformation:CreateUploadBucket",
"cloudformation:CancelUpdateStack",
"cloudformation:CreateStack",
@stanzheng
stanzheng / README.md
Last active Feb 7, 2019
postgres examples from pgexercises.com
View README.md
@stanzheng
stanzheng / README.md
Created Apr 7, 2018
Riddler Express From Eric Veneto, mathematical madmen are on the loose:
View README.md

Riddler Express From Eric Veneto, mathematical madmen are on the loose:

The year is 2000, and an arithmetical anarchist group has an idea. For the next 100 years, it will vandalize a famous landmark whenever the year (in two-digit form, for example this year is “18”) is the product of the month and date (i.e. month × date = year, in the MM/DD/YY format).

A few questions about the lawless ensuing century: How many attacks will happen between the beginning of 2001 and the end of 2099? What year will see the most vandalism? The least? What will be the longest gap between attacks?

@stanzheng
stanzheng / main.js
Created Feb 20, 2018
Sharpen your saw 5
View main.js
const assert = require('assert')
// 5 chapters 1 for a
// not all later chapter is all e
// a book with la
// scots from hogtowns or cowtowns work from cockrow to moondown -- to chop down woodlots to plow down cornrows.
@stanzheng
stanzheng / README.md
Created Feb 1, 2018
Serverless IAM Permissions Required
View README.md