Groovy: How can I include backslashes inside a string without escaping?

Wow, another gotcha with putting Windows files paths in slashy strings. Nice catch. The gotcha I’ve encountered before was including a trailing backslash on the path, e.g. /C:\path\/, which results in an unexpected char: 0xFFFF error. Anyways, for the sake of an answer, given that Windows paths are case insensitive, why not exploit it for … Read more

How to convert the value of %USERNAME% to lowercase within a Windows batch script?

Well, I was browsing for some syntax and stumbled upon this page. I know its old but I thought I’d take a break and give the brain a little kick. Here’s something a little shorter and manageable. This just “brute forces” all uppercase letters to lowercase letters without regards to whether the actual letter exists … Read more

Is node.js a viable alternative to traditional scripting languages like Perl and Python? [closed]

In terms of Node.js, I can’t see it becoming a mainstream way of using javascript as a general purpose scripting language. The main reason for that would be the async nature of 99% of the libraries and functions available in Node.js. Because of the async nature, you have to completely change your thinking. Not having … Read more

Add Package Control in Sublime Text 3 through the command line

The easiest way is to download https://packagecontrol.io/Package%20Control.sublime-package using wget or curl, and store it in ~/.config/sublime-text-3/Installed Packages. It will then set itself up upon first starting the editor. As a bonus, if you create ~/.config/sublime-text-3/Packages/User/Package Control.sublime-settings and populate it with the packages you want installed, everything should work more-or-less automatically to download and install everything. … Read more

Calling a script from a setuid root C program – script does not run as root

Since the suid bit on executables only changes the effective UID (EUID) the executable will run as, and not the real UID (RUID) which getuid() returns, and in addition to the restriction on suid interpreted scripts (any executable beginning with “#!“), some shells like bash as an extra safety measure will set the EUID back … Read more

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