Skip to content

Instantly share code, notes, and snippets.

@VANITAX
VANITAX / 00_README.md
Created March 2, 2022 08:17 — forked from LeZuse/00_README.md
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@VANITAX
VANITAX / code_colors_discordjs.md
Created May 15, 2021 05:59 — forked from thomasbnt/code_colors_discordjs.md
Code colors for embed discord.js

Here is an updated list of the colors that are currently implemented with a name

Name Int value Hex Code
DEFAULT 0 #000000
AQUA 1752220 #1ABC9C
DARK_AQUA 1146986 #11806A
GREEN 3066993 #2ECC71
DARK_GREEN 2067276 #1F8B4C
BLUE 3447003 #3498DB
@VANITAX
VANITAX / Dockerfile
Created October 22, 2018 07:22 — forked from AlwxSin/Dockerfile
Sentry docker-compose with telegram integration
FROM sentry:onbuild
@VANITAX
VANITAX / index.html
Created July 17, 2018 19:06
jq 图片校验(图片格式,长度和宽度,容量大小)
<input type="file" id="photoInput" />
@VANITAX
VANITAX / README.md
Created December 13, 2017 09:21 — forked from denji/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@VANITAX
VANITAX / jsnote.js
Created September 25, 2017 07:35 — forked from mason276752/jsnote.js
你平常不會用到的js
str1 = "http://www.google.tw/search?q=中文";
obj = {
get a(){return '1';},
set b(value){this.c = value;},
c:1
};
class Cls{
constructor(name){
console.log("hello",name);
if (typeof(new.target)==='function')
@VANITAX
VANITAX / test.js
Created July 31, 2017 09:13 — forked from tony1223/test.js
var pcsc = require('pcsclite');
var iconv = require('iconv-lite');
var pcsc = pcsc();
pcsc.on('reader', function(reader) {
console.log('New reader detected', reader.name);
reader.on('error', function(err) {
@VANITAX
VANITAX / introrx.md
Created March 5, 2017 08:20 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
- 我想要挑戰isomorphic,但目前好像比較少redux配isomorphic又配上webpack的方案
- 這個範例可看,最近全部改寫過
- https://github.com/coodoo/react-redux-isomorphic-example
- 注意下面幾點
- js/bootClient.js 與 js/bootServer.js
- bootServer.js 負責做 server-render