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 / Github SSH Connection Tutorial.txt
Last active February 20, 2022 12:02
Github SSH Connection Tutorial ( And Deploy ssh-agent with fish shell )
1. Generated ssh key
` ssh-keygen -t rsa -b 4096 -C "{ Your email }" ` .
2. added your pub key in `https://github.com/settings/ssh/new`.
3. changed your git remote url to ssh .
` git remote set-url origin [email protected]:{name/repo} `
@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
@VANITAX
VANITAX / init.coffee
Last active December 3, 2018 08:20
Profile Setting
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to make opened Markdown files always be soft wrapped:
#
# path = require 'path'
#