Skip to content

Instantly share code, notes, and snippets.

View yi-mei-wang's full-sized avatar
👻
Inactive on GitHub

Yi Mei Wang yi-mei-wang

👻
Inactive on GitHub
View GitHub Profile
@yi-mei-wang
yi-mei-wang / howto.md
Created May 11, 2021 04:36 — forked from atrolla/howto.md
Deploy multiple Spring boot app on a single tomcat with different configuration for each app
@yi-mei-wang
yi-mei-wang / example.md
Created April 13, 2021 06:41 — forked from sdnts/example.md
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@yi-mei-wang
yi-mei-wang / notifySlack.groovy
Created March 17, 2021 09:22 — forked from dschaaff/notifySlack.groovy
jenkins pipeline library for slack notifications with nice formatting
#!/usr/bin/env groovy
/**
* notify slack and set message based on build status
*/
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import hudson.tasks.test.AbstractTestResultAction;
import hudson.model.Actionable;
@yi-mei-wang
yi-mei-wang / idea
Created November 7, 2020 11:30 — forked from chrisdarroch/idea
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@yi-mei-wang
yi-mei-wang / pw-todo.md
Last active November 5, 2019 02:39
Peewee To-do List

Setting up

  1. Create Conda environment
  2. Install peewee, peewee-db-evolve
  3. Save your installation into requirements.txt
  4. Create a db

Tasks

  1. Create your tables, you may refer to your todo-list schema from our previous challenge if you want
@yi-mei-wang
yi-mei-wang / flask_demo.md
Last active November 5, 2019 05:57
Learning points for Intro to Flask lecture

What we will do in this lecture

  1. Set up Conda env

  2. Install the necessary packages

    1. pip install flask
    2. pip freeze > requirements.txt
  3. Set up Git repo

@yi-mei-wang
yi-mei-wang / regex.md
Last active October 23, 2019 05:35
Regular expressions in Python

Regex in Python

  1. Use the regex library by typing

    import re
  2. A regex pattern looks like this:

r""

@yi-mei-wang
yi-mei-wang / python-day-1.md
Last active October 23, 2019 06:53
Python day 1 part 2

Today's agenda!

  1. Comments

  2. Lists (just an array)

    1. Slice syntax
    2. name_of_list[start:end:step]
  3. Dictionaries (just an object)

  4. Accessing items inside a dict

@yi-mei-wang
yi-mei-wang / react-basics.md
Created October 18, 2019 09:20
React basics

How to manage the state

  1. state is an obj (state={})
  2. setState() - updates the state

How to use lifecycle methods

  1. render() - convert what is inside return() into HTML
  2. componentDidMount() - after the first render, only runs once
  3. componentDidUpdate() - after setState()

How to write components in React