Skip to content

Instantly share code, notes, and snippets.

@zjaml
zjaml / zenmode
Created November 22, 2019 23:01
zen mode
127.0.0.1 www.yahoo.co.jp
127.0.0.1 www.businessinsider.com
127.0.0.1 www.crosswalk.com
127.0.0.1 twitter.com
127.0.0.1 api.twitter.com
127.0.0.1 abs.twimg.com
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
@zjaml
zjaml / orientation.md
Last active April 23, 2019 23:24
Orientation

Orientation

Taste and aesthetics

  • What is elegant code
  • What should be put where

Learning how to learn

  • Read open source code
@zjaml
zjaml / cloudSettings
Last active February 28, 2019 03:51
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-28T03:51:49.687Z","extensionVersion":"v3.2.5"}
@zjaml
zjaml / cloudSettings
Created February 25, 2019 05:54
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-25T05:53:00.556Z","extensionVersion":"v3.2.5"}
@zjaml
zjaml / cloudSettings
Created February 22, 2019 01:21
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-22T01:21:10.031Z","extensionVersion":"v3.2.5"}
var canvas = this.__canvas = new fabric.Canvas('c');
canvas.selection = false;
function drawArrow(fromx, fromy, tox, toy) {
var angle = Math.atan2(toy - fromy, tox - fromx);
var headlen = 15; // arrow head size
// bring the line end back some to account for arrow head.
@zjaml
zjaml / npm-exec.bat
Created April 19, 2017 04:20 — forked from joeyespo/npm-exec.bat
Execute a node_modules/.bin script on Windows.
@ECHO OFF
SETLOCAL
REM Speed up by checking for bin directory directly
IF NOT EXIST node_modules\.bin GOTO FINDBIN
SET BIN=.\node_modules\.bin
GOTO RUN
:FINDBIN
REM Find the current bin directory from npm, storing the result in 'BIN'
@zjaml
zjaml / cmd.md
Last active June 30, 2018 08:22
Common Command
  • Port Scan
    • Windows:
// list listened ports with process info
netstat -ano -np TCP | find "80"
  • Linux & Mac
# 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 log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->