Skip to content

Instantly share code, notes, and snippets.

View lomocc's full-sized avatar

vincent lomocc

  • Chengdu
View GitHub Profile
@lomocc
lomocc / index.html
Created March 15, 2019 01:23
create-react-app development react-dev-utils/webpackHotDevClient polyfill
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<!--
@lomocc
lomocc / Dockerfile.nodejs
Created November 29, 2018 02:51
Dockerfile
# build environment
FROM node as builder
ARG REACT_APP_SHA
ENV REACT_APP_SHA=${REACT_APP_SHA}
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
RUN npm install -g -s --no-progress yarn
@lomocc
lomocc / kubernetes-seafile.md
Last active November 24, 2021 18:51
Seafile Kubernetes(Deployment, Service, Ingress)
docker run -t -i \
  -p 10001:10001 \
  -p 12001:12001 \
  -p 8000:8000 \
  -p 8080:8080 \
  -p 8082:8082 \
  -v /srv/seafile:/opt/seafile \
  jenserat/seafile -- /bin/bash
@lomocc
lomocc / nginx.conf
Created June 14, 2018 09:48
nginx html5Mode
server {
listen 80;
server_name localhost;
location / {
autoindex on;
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
@lomocc
lomocc / DisplayObject.js
Last active April 23, 2018 07:57
OOP React
import React from "react";
import ReactDOM from "react-dom";
function createUID() {
// Char codes for 0123456789ABCDEF
var ALPHA_CHAR_CODES = [
48,
49,
50,
51,
@lomocc
lomocc / latlng.json
Last active September 13, 2024 12:17
全国城市经纬度
{
"name": "中国",
"children": [
{
"name": "北京",
"lat": "116.405285",
"lng": "39.904989",
"children": [
{
"name": "北京市",
@lomocc
lomocc / kubernetes_troubleshooting.md
Last active January 22, 2018 09:24
kubernetes 一些问题和解决方式记录

service_account_key_file

Generate a signing key:

$ openssl genrsa -out /tmp/serviceaccount.key 2048

Update /etc/kubernetes/apiserver:

KUBE_API_ARGS="--service_account_key_file=/tmp/serviceaccount.key"
export http_proxy="10.82.14.52:10010"
export no_proxy="localhost,127.0.0.1,10.82..,bigdata"
unset http_proxy
@lomocc
lomocc / excel.bat
Created April 20, 2017 06:29
撤销EXCEL工作表保护
Option Explicit
Public Sub AllInternalPasswords()
' Breaks worksheet and workbook structure passwords. Bob McCormick
' probably originator of base code algorithm modified for coverage
' of workbook structure / windows passwords and for multiple passwords
'
' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)
' Modified 2003-Apr-04 by JEM: All msgs to constants, and
' eliminate one Exit Sub (Version 1.1.1)
' Reveals hashed passwords NOT original passwords