Skip to content

Instantly share code, notes, and snippets.

@martinadamsdev
martinadamsdev / Navigation.jsx
Created November 18, 2024 20:18
Navigation.jsx
import React, { useState, useEffect } from 'react';
import { Menu, X, ChevronDown, Sun, Moon } from 'lucide-react';
import {
Sheet,
SheetContent,
SheetTrigger,
} from "@/components/ui/sheet";
const Navigation = ({
theme = 'light',
@martinadamsdev
martinadamsdev / .vmoptions
Created July 11, 2024 11:50
Jetbrains IDE VM Options
-Xms4096m
-Xmx10240m
-XX:CICompilerCount=6
-XX:+UseG1GC
-XX:MaxGCPauseMillis=200
-XX:InitiatingHeapOccupancyPercent=45
-XX:NewRatio=3
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops
-XX:+OptimizeStringConcat
@martinadamsdev
martinadamsdev / Dockerfile
Last active July 11, 2024 07:16
build nginx image
FROM alpine as base
ARG NGINX_VERSION=1.27.0
RUN apk update && apk upgrade && \
apk add --no-cache --virtual .build-deps bash tar wget gcc g++ make file perl linux-headers ca-certificates openssl-dev pcre-dev zlib-dev openssl pcre zlib && \
where pcre && \
where openssl && \
where zlib
# wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && tar zxf nginx-${NGINX_VERSION}.tar.gz
@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