Skip to content

Instantly share code, notes, and snippets.

View pivstone's full-sized avatar

Ray Wang pivstone

  • Berlin
View GitHub Profile
@pivstone
pivstone / musicals.md
Last active April 17, 2023 15:06
My Musicals List

Westend (Westend)

Recommened (& Watched)

  • Come from away
  • Kinky Boots
  • Everybody's talking about Jamie
  • The book of Mormon
  • Oklahoma! (the new version, not the old one)

Watched

@pivstone
pivstone / Choco Curry.md
Last active October 29, 2021 15:44
Choco Curry

Context

  • Choco is using AWS Lambda fully, we don't have any bare metal server or virtual machine.
  • AWS AppSync + AWS Lambda + AWS DynamoDB are our main tech stack.
  • AWS CloudFormation is the only tool to manage all AWS resources.

Pain Point

There are not perfect tech, especially for the new one. In our daily dev life, we have two main issues.

Groundhog day

@pivstone
pivstone / 2018_d3.exs
Last active December 13, 2018 16:01
[Elixir] adventofcode 2018 Day 3
#Part 1
data = ["#1 @ 429,177: 12x27", "#2 @ 862,948: 20x11", "#3 @ 783,463: 22x20"]
data |> Enum.map(fn str ->
[_, data] = String.split(str, "@")
[point, range] = String.split(data, ":")
[top, right] = String.split(point, ",")
[xs, ys] = String.split(range, "x")
[top, right, xs, ys]
@pivstone
pivstone / 2018_d1.exs
Created December 13, 2018 08:44
[Elixir] adventofcode 2018 Day 1
# Part 1
data = ['+3', '-3']
data
|> Enum.map(&(String.to_integer))
|> Enum.sum
# Part 2
acc = {0, %{}}
@pivstone
pivstone / 2018_d2.exs
Last active December 13, 2018 16:00
[Elixir] adventofcode 2018 Day 2
### Part 1
data = ["kbqwtcvzgumhpwelrnaxydpfuj", "kbqwtcvzgsmhpoelryaxydiqij",
"kbqwpcvzssmhpoelgnaxydifuj", "kbqgtcvxgsmhpoalrnaxydifuj",
"kbqwtcvygsmhpoelrnaxydiaut", "kbqwtcvjgsmhpoelrnawydzfuj"]
# count the duplicated char
process = fn x ->
x
|> Enum.chunk_every(1)
@pivstone
pivstone / convert.py
Created August 9, 2018 09:49
Convert the Couchbase export csv file to truly CSV file
#!/usr/bin/env python3
import sys
import csv
import json
file = sys.argv[1]
if (not file):
print('invalid args, need a file path')
exit(1)
@pivstone
pivstone / hello.js
Last active July 12, 2018 08:58
hello.js
const chain = async(require, app, ...data) => {
const axios = require('axios');
const content = await axios.get('https://www.google.com');
console.log(content.data);
console.log(app.data);
};
China has a nine years compulsory education. All citizens have to attend the education. The whole of nine years education is almost free, except the fee for textbooks and others. Before Republic’s government, there was a similar education act. It was a four years plan. At present, some rich provinces are trying a new education plan. It’s a 12 years education plan. It means the free education services will include high school.
The most important part of Chinese education is the National University Entrance Examination. The exam leads the education standards. Another word, it means the exam determine what knowledge should be taught in school.
During the Cultural evolution, the exam was stopped. Students couldn’t enter University. All the high education had been completely stopped.
The exam has so many changes. In the beginning, the whole countries' students did the same exam. But some people found some cities’ students could enter same level university with lower scores than others. The reason is that those c
@pivstone
pivstone / future.txt
Last active September 17, 2017 10:20
EF小作文:规划退休生活
I always think about my future goals. I will have moved to German for work by 2050. By that time, I will have become a manager. I will have retired in the city when I'm 60. Hopefully, I will have gotten married and raised a cat before my 40. Maybe, I will have owned a lovely garden and planted a lot of flowers and those things will put me in a good mood when I'm 50. My family and I will have traveled some different places where we have never visited, like New Zealand or Amazon. Finally, I will have to experience many different life stages before I feel too tired. I think I will have a different retirement life.
@pivstone
pivstone / music.txt
Created August 3, 2017 03:42
EF小作文:音乐鉴赏
'Home Improvement' singed by Josh Woodward. The song has not much changes of tone.
Hence, it’s a little boring in the rhythm. Josh doesn’t have a wide range.
He hits few high notes. And his voice isn’t catchy. However, the song has some wonderful harmony.
The tune filled by the acoustic of guitars and drums. It has many positive motive.
I think that the song's theme is about lives, families and houses.
I'm not a big fan of the Josh Woodward.
Even though I listened this song several times, I can't understand what the lyric means is.
If you like folk, you will be like this song.