Skip to content

Instantly share code, notes, and snippets.

View IvanAdmaers's full-sized avatar

IvanAdmaers

View GitHub Profile
@MidSpike
MidSpike / readme.md
Last active July 19, 2024 20:45
CVE-2022-23812 | RIAEvangelist/node-ipc is malware / protest-ware
@adrianhajdin
adrianhajdin / app styles
Last active April 1, 2024 11:30
Memories Initial Styles
import { makeStyles } from '@material-ui/core/styles';
export default makeStyles(() => ({
appBar: {
borderRadius: 15,
margin: '30px 0',
display: 'flex',
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
@kachar
kachar / Link-Next13.tsx
Last active July 5, 2024 06:10
Next.js Link + Material UI Link/Button components bundled with forwardRef
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@rupeshtiwari
rupeshtiwari / Setting up Webpack for Typescript Project From Scratch.md
Last active July 22, 2024 11:22
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.
/*
Create a Mask for an email address using ES6 syntax
Could be used for confirmation of email address or preventing to public expose of address
Author: Andrew Guk https://gist.github.com/gukandrew
*/
function emailMask(email, mask = '*') {
let masked = '';
let prev;
@chranderson
chranderson / nvmCommands.js
Last active July 23, 2024 09:37
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@ahmu83
ahmu83 / US_States_and_Cities.json
Created July 20, 2016 16:50
List of US States and Cities in JSON format.
{
"New York": [
"New York",
"Buffalo",
"Rochester",
"Yonkers",
"Syracuse",
"Albany",
"New Rochelle",
"Mount Vernon",
@laterbreh
laterbreh / Express 4 and Socket.io: Passing socket.io to routes - app.js
Last active August 15, 2023 13:58
Express 4 and Socket.io: Passing socket.io to routes.
var app = express();
app.io = require('socket.io')();
var routes = require('./routes/index')(app.io);
app.use('/', routes);
@piaoger
piaoger / setfiletime.js
Created August 24, 2015 03:40
Set file time in node.js
// set file add/mode time
var fs = require('fs')
function setFileTime(filePath, atime, mtime) {
fs.utimesSync(filePath, atime, mtime);
}
var date = new Date('Thu Aug 20 2015 15:10:36 GMT+0800 (CST)');
setFileTime('/tmp/scache/fdf/admin.log', date, date);