Skip to content

Instantly share code, notes, and snippets.

@szemate
szemate / package-lock-conflicts.md
Last active May 5, 2025 07:32
How to resolve package-lock.json conflicts

How to resolve package-lock.json conflicts

It is not possible to resolve conflicts of package-lock.json in GitHub's merge tool and you need to do a manual merge.

  1. Update the master branch with the latest changes:
    git checkout master
    git pull
    
  2. Merge your feature branch into master:
@Thamjith
Thamjith / README.md
Created August 16, 2020 08:52 — forked from robyngit/D3 v3 time-series line chart.md
D3 v3 time-series line chart

D3 timeseries chart

  • the D3 chart currently displayed on metacat UI
  • issue: the line and area shapes interpolate across missing data
  • features:
    • mini 'brush' chart shows the context of the data in focus in the main chart
    • x-axis zooming and panning is limited to the range of available data
    • y-axis resizes automatically to match the maximum y-value of the data in focus
    • buttons zoom focus to an interval equal to one year (if sufficient data), one month, or the range of the data
  • text at top changes to indicate the range of data in focus
@syaau
syaau / javascript-spread-operator-performance.js
Created February 25, 2020 13:47
Check spread operator vs Object.assign performance (with varying key sizes)
// Test object recreate speed on large objects vs small objects
function createObject(propsCount) {
const obj = {};
for (let i = 0; i < propsCount; i += 1) {
obj[`p${i}`] = i;
}
return obj;
}
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active March 10, 2025 19:33
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@diegopacheco
diegopacheco / apport-linux.md
Last active November 25, 2023 10:59
Apport 100% CPU and Very High LA on Ubuntu Linux
sudo service apport stop
sudo rm -f /var/crash/*
sudo apt-get remove apport -y
@ChandrakantThakkarDigiCorp
ChandrakantThakkarDigiCorp / LICENSE.txt
Last active July 29, 2023 07:04
Grouped Horizontal Bar Chart with D3 V4
MIT License
Copyright (c) [2017] [DIGI-CORP]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@zmts
zmts / tokens.md
Last active June 13, 2025 13:47
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@dleonard00
dleonard00 / explode-opvn.sh
Created January 15, 2017 07:31
extract the certificate and key from an .ovpn file
#!/bin/bash
# This script will extract the certificate and key from an .ovpn file
# into their own files, which makes it possible to use them to configure
# the VPN using Ubuntu's network manager
# Usage example:
# >> ovpnconvert username.dev.ovpn
# You can keep following these instructions here:
@cncolder
cncolder / .eslintrc.js
Last active September 5, 2023 06:42
A way to hack create-react-app for custom config
// Put me under ./src
module.exports = {
extends: 'react-app',
rules: {
eqeqeq: 'off'
}
}
@gund
gund / readme.md
Last active July 4, 2018 18:27
Webpack 2 beta circular dependencies trouble

So consider we have Logger class. And also we have a LoggerInContext class which extends Logger. And Logger has factory method to create new LoggerInContext instances.

// logger.ts

import { LoggerInContext } from './logger-in-context';

export class Logger {