Skip to content

Instantly share code, notes, and snippets.

View Zrufy's full-sized avatar

Vincenzo Fornaro Zrufy

  • Parma,Italy
View GitHub Profile
@Zrufy
Zrufy / current_dir.h
Created February 11, 2022 08:44
C++ method to get the current directory, i.e. .EXE path.
#include <Windows.h>
#include <string>
std::string GetCurrentDirectory()
{
char buffer[MAX_PATH];
GetModuleFileNameA(NULL, buffer, MAX_PATH);
std::string::size_type pos = std::string(buffer).find_last_of("\\/");
return std::string(buffer).substr(0, pos);
@Zrufy
Zrufy / itunes.sh
Created May 12, 2016 00:11 — forked from rkumar/itunes.sh
control iTunes from command line
#!/bin/bash
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# edit 2010.06.01 rahul kumar
####################################
showHelp () {