This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rbconfig' | |
ruby_path = File.join(Config::CONFIG["bindir"], | |
Config::CONFIG["RUBY_INSTALL_NAME"]+ | |
Config::CONFIG["EXEEXT"]) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/xattr.h> | |
/// Set a flag that the files shouldn't be backuped to iCloud. | |
+ (void)addSkipBackupAttributeToFile:(NSString *)filePath { | |
u_int8_t b = 1; | |
setxattr([filePath fileSystemRepresentation], "com.apple.MobileBackup", &b, 1, 0, 0); | |
} | |
/// Returns the legacy storage path, used when the com.apple.MobileBackup file attribute is not available. | |
+ (NSString *)legacyStoragePath { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |