cd ~/Library/Android/sdk/platform-toolsor
export PATH=~/Library/Android/sdk/tools:$PATH| sudo apt-get update | |
| sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common build-essential vim git curl net-tools openssh-server zsh direnv | |
| # zsh | |
| sudo chsh -s /bin/zsh | |
| # git | |
| git config --global user.name "CreatiCoding" |
| <template> | |
| <div> | |
| <div v-for="(content, index) in contents" :key="`key_${identifier}_${index}`"> | |
| <slot name="List" :content="content"></slot> | |
| </div> | |
| </div> | |
| </template> | |
| <script> | |
| export default { |
| import { RedisClient, createClient } from "redis"; | |
| const API = "api"; | |
| export class RedisACL { | |
| private client: RedisClient; | |
| constructor(private password: string) { | |
| this.client = createClient({ password }); | |
| } |
| // standard watch | |
| const watch = (obj, key, defalut_value, callback) => { | |
| Object.defineProperty(obj, key, { | |
| get() { | |
| return this._value || defalut_value; | |
| }, | |
| set(value) { | |
| this._value = value; | |
| callback(this._current); | |
| }, |
| const _ = require('lodash'); | |
| var obj = [ | |
| { x: 1, x1: 123, a: 2, b: 3 }, | |
| { x: 2, x1: 5432, a: 4, b: 23 }, | |
| { x: 1, x1: 123, a: 123, b: 324 }, | |
| ]; | |
| var common_column = ['x', 'x1']; | |
| var result = _.chain(obj) | |
| .groupBy('x') |
| const queryStr2queryObj = | |
| (queryStr) => queryStr !== '' | |
| ? queryStr | |
| .split('&') | |
| .map((e) => ({ [e.split('=')[0]]: e.split('=')[1] })) | |
| .reduce((a, c) => { | |
| return { ...a, ...c }; | |
| }) | |
| : {}; |
| # docker run -it -p 8080:8080 -v "/Users/creco/git/spring-boot-project/spring-boot-project:/root/spring-boot-project" ubuntu | |
| # apt-get update && apt-get install wget -y | |
| # wget -O - https://gist.githubusercontent.com/CreatiCoding/1320bab655cdd04ee53f3dd6aac2d245/raw/ | bash | |
| apt-get install software-properties-common -y | |
| add-apt-repository ppa:webupd8team/java -y | |
| add-apt-repository ppa:cwchien/gradle -y | |
| apt-get update | |
| apt-get install openjdk-8-jdk vim git -y |
| // From https://gist.github.com/Ibro/262ee343ea3a2a244ec76b44f6723713#file-typescript-intersection-type-simple-ts | |
| // Origin code is error code. So I fix it by referencing https://www.typescriptlang.org/docs/handbook/interfaces.html | |
| interface IStudent { | |
| id: string; | |
| age: number; | |
| } | |
| interface IWorker { | |
| companyId: string; |