Skip to content

Instantly share code, notes, and snippets.

View er0603's full-sized avatar
💦

Jacky Sung er0603

💦
View GitHub Profile
@idleberg
idleberg / vscode-macos-context-menu.md
Last active July 5, 2024 03:03
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@rupeshtiwari
rupeshtiwari / Setting up Webpack for Typescript Project From Scratch.md
Last active May 8, 2024 08:50
Setting up Webpack for Typescript Project From Scratch

Setting up Webpack for any Typescript project from Scratch

Welcome to step by step hands-on guide to setup webpack in your upcoming typescript project. Please follow the steps and you should be able to create your own webpack project. Please download the source code from github.

You will learn below things:

  1. ✅Create a Typescript node.js project.
  2. ✅Install Dependencies with webpack & typescripts.
  3. ✅Use Webpack CLI to crate webpack.config.js file and modify webpack.config.js based on our need.
@patrickgalbraith
patrickgalbraith / package-version.bat
Created January 28, 2019 23:38
Extract package.json version in Windows Batch (.bat) file
@echo off
setlocal EnableDelayedExpansion
set c=0
set version=""
for /f "tokens=1,2 delims=:, " %%a in (' find ":" ^< "package.json" ') do (
if "%%~a"=="version" (
set version=%%~b
)
@zfael
zfael / nodejs.checksum.js
Created June 20, 2017 13:57
NODE.JS - How to generate file's Checksum (CRYPTO)
var fs = require('fs');
var crypto = require('crypto');
fs.readFile('file.pdf', function(err, data) {
var checksum = generateChecksum(data);
console.log(checksum);
});
function generateChecksum(str, algorithm, encoding) {
return crypto