Phoenix 1.5 requires Elixir >= 1.7. Be sure your existing version is up to date by running elixir -v
on the command line.
$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.5.0
import React, { useRef, useEffect } from 'react'; | |
const scaleWidth = 500; | |
const scaleHeight = 500; | |
/* | |
topImage is an object | |
{ | |
image: String, // name of image | |
imageUrl: String, // full url of remote hosted image |
rem see https://github.com/coreybutler/nvm-windows/issues/300 | |
@echo off | |
SETLOCAL EnableDelayedExpansion | |
if [%1] == [] ( | |
echo Pass in the version you would like to install, or "latest" to install the latest npm version. | |
) else ( | |
set wanted_version=%1 |
const PLUGIN_NAME = 'MY_WEBPACK_PLUGIN'; | |
class MyWebpackPlugin { | |
constructor() { | |
this.cssReady = false; | |
this.cssFiles = []; | |
} | |
apply(compiler) { | |
compiler.hooks.watchRun.tap(PLUGIN_NAME, () => { | |
this.cssReady = false; |
Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
#!/bin/bash | |
#get highest tag number | |
VERSION=`git describe --abbrev=0 --tags` | |
#replace . with space so can split into an array | |
VERSION_BITS=(${VERSION//./ }) | |
#get number parts and increase last one by 1 | |
VNUM1=${VERSION_BITS[0]} |
import React from "react"; | |
const scaleWidth = 500; | |
const scaleHeight = 500; | |
function draw(canvas, scaleX, scaleY) { | |
const context = canvas.getContext("2d"); | |
context.scale(scaleX, scaleY); | |
context.clearRect(0, 0, canvas.clientWidth, canvas.clientHeight); |
# ========================================================== | |
# NPM | |
# ========================================================== | |
npm set registry https://registry.npmmirror.com # 注册模块镜像 | |
npm set disturl https://npmmirror.com/mirrors/node # node-gyp 编译依赖的 node 源码镜像 | |
## 以下选择添加 | |
npm set sass_binary_site https://registry.npmmirror.com/mirrors/node-sass # node-sass 二进制包镜像 | |
npm set electron_mirror https://registry.npmmirror.com/mirrors/electron/ # electron 二进制包镜像 |
#example for making jq | |
export LDFLAGS="-L/usr/local/opt/openssl/lib" | |
export CPPFLAGS="-I/usr/local/opt/openssl/include" | |
. ~/workspace/emsdk/emsdk_env.sh | |
autoreconf -fi | |
emconfigure ./configure | |
emmake make LDFLAGS=-all-static | |
#emcc -O2 jq.obj -o jq.js -s ERROR_ON_UNDEFINED_SYMBOLS=0 | |
emcc -O3 -s ALLOW_MEMORY_GROWTH=1 -s MODULARIZE_INSTANCE=1 -s EXPORT_NAME="jq" -s WASM=1 --pre-js ./pre.js --post-js ./post.js jq.o -o ./jq.wasm.js -s ERROR_ON_UNDEFINED_SYMBOLS=0 |