Nodejs + npm, installing modules on ntfs partition

Since version 1.2.21, npm has a new option for the install command. –no-bin-links You can use if for installing a specific node module npm install express –no-bin-links and also for a package.json install npm install –no-bin-links With this option I’ve been able to install many npm modules without problems in my shared forlder inside the … Read more

C++/Win32: How to wait for a pending delete to complete

There are other processes in Windows that want a piece of that file. The search indexer is an obvious candidate. Or a virus scanner. They’ll open the file for full sharing, including FILE_SHARE_DELETE, so that other processes aren’t heavily affected by them opening the file. That usually works out well, unless you create/write/delete at a … Read more

Case-sensitive path collisions on case-insensitive file system when I do git clone

Definitions case-sensitive filesystem: treats john.jpg and JOHN.jpg as two different files and this is allowed. case-insensitive filesystem: treats john.jpg and JOHN.jpg as one and the same file which is not allowed. Problem ‘components/User/index.js’ ‘components/user/index.js’ The problem here is that User and user are not allowed to co-exist at the same time inside the components directory … Read more

How do I force Robocopy to overwrite files?

From the documentation: /is Includes the same files. /it Includes “tweaked” files. “Same files” means files that are identical (name, size, times, attributes). “Tweaked files” means files that have the same name, size, and times, but different attributes. robocopy src dst sample.txt /is # copy if attributes are equal robocopy src dst sample.txt /it # … Read more

How to read and modify NTFS Alternate Data Streams using .NET [closed]

Here is a version for C# using System.Runtime.InteropServices; class Program { static void Main(string[] args) { var mainStream = NativeMethods.CreateFileW( “testfile”, NativeConstants.GENERIC_WRITE, NativeConstants.FILE_SHARE_WRITE, IntPtr.Zero, NativeConstants.OPEN_ALWAYS, 0, IntPtr.Zero); var stream = NativeMethods.CreateFileW( “testfile:stream”, NativeConstants.GENERIC_WRITE, NativeConstants.FILE_SHARE_WRITE, IntPtr.Zero, NativeConstants.OPEN_ALWAYS, 0, IntPtr.Zero); } } public partial class NativeMethods { /// Return Type: HANDLE->void* ///lpFileName: LPCWSTR->WCHAR* ///dwDesiredAccess: DWORD->unsigned int ///dwShareMode: … Read more

Enable native NTFS symbolic links for Cygwin

⸻⸻  Short answer  ⸻⸻ Define environment variable: CYGWIN=winsymlinks:nativestrict As pointed out by mwm you may also have to go to the settings or to run bash as Administrator. See the Notes section. ⸻⸻  Long answer  ⸻⸻ Default Cygwin symlinks are just regular files By default Cygwin creates text files as workaround for Windows symlink flaw. … Read more

What is the difference between NTFS Junction Points and Symbolic Links?

Symbolic links have more functionality, while junctions almost seem to be a legacy feature because of their limitations, but the security implications of these limitations are specifically why a junction might be preferred over a symbolic link. Remote targeting makes symbolic links more functional, but also raises their security profile, while junctions are safer because … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)