Skip to content

Instantly share code, notes, and snippets.

@martinadamsdev
martinadamsdev / mdnice-resume.css
Created January 5, 2023 12:05
mdnice-resume.css
/* 全局属性
* 页边距 padding: 20px;
* 全文字体 font-family: ptima-Regular;
* 英文换行 word-break: break-all;
*/
#nice {
}
/* 段落,下方未标注标签参数均同此处
* 上边距 margin-top: 2px;
@martinadamsdev
martinadamsdev / GetObjectValues.js
Last active July 29, 2022 13:29
Get Object Values
const obj = {
a: 1,
b: 2,
c: 3,
d: 4,
e: 5,
}
@martinadamsdev
martinadamsdev / migratingRules.md
Created September 24, 2021 02:13 — forked from Jaid/migratingRules.md
ESLint rules for migrating projects from CommonJS to ESM

ESLint rules

The ESM standard is considered stable in NodeJS and well supported by a lot of modern JavaScript tools.

ESLint does a good job validating and fixing ESM code (as long as you don't use top-level await, coming in ESLint v8). Make sure to enable the latest ECMA features in the ESLint config.

  • .eslint.json
{
@martinadamsdev
martinadamsdev / index.html
Created June 3, 2021 04:33 — forked from AWeiJie/index.html
HTML5 Canvas圆盘抽奖应用(适用于Vue项目)
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>HTML5 Canvas圆盘抽奖应用DEMO演示</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<style>
* {
padding: 0px;
<!DOCTYPE html>
<html lang="en">
<head>
<title>创建threejs场景-旋转的立方体</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body{margin: 0}
canvas{width: 100% ; height: 100%}
div#drawArea{

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@martinadamsdev
martinadamsdev / relativeOrientation.ts
Created March 18, 2021 11:51 — forked from thw0rted/relativeOrientation.ts
Cesium function to transform relative heading-pitch-roll to absolute rotation Quaternion
import {
Cartesian3,
HeadingPitchRoll,
Matrix3,
Matrix4,
Quaternion,
Transforms,
} from "cesium";
/**
@martinadamsdev
martinadamsdev / angular-require-shim.js
Created October 10, 2020 02:37 — forked from beginor/angular-require-shim.js
RequireJS Shim for AngularJS 1.3.0
requirejs.config({
baseUrl: 'scripts',
paths: {
'angular': 'lib/angular/angular',
'angular-animate': 'lib/angular/angular-animate',
'angular-aria': 'lib/angular/angular-aria',
'angular-cookies': 'lib/angular/angular-cookies',
'angular-messages': 'lib/angular/angular-messages',
'angular-mocks': 'lib/angular/angular-mocks',
'angular-resource': 'lib/angular/angular-resource',
@martinadamsdev
martinadamsdev / TextEllipsis.vue
Created September 30, 2020 12:58 — forked from xhsdnn/TextEllipsis.vue
单/多行文本截断的vue组件
<template>
<div class="text-ellipsis" :style="{height: textHeight,lineHeight: lineHeight}">
<div class="ellipsis-before" :style="{height: textHeight}"></div>
<div class="ellipsis-content">
<template v-if="$slots.default">
<slot></slot>
</template>
<template v-else>{{text}}</template>
</div>
<div class="ellipsis-after" :style="{top: '-'+lineHeight, height: lineHeight}">...</div>