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
# shutdown Skype | |
# Skype username - it's a login at Skype | |
# Mac username - it's a short username of Mac OS X (ex.: dive) | |
# <...> should be entered without brackets <> | |
#copy this one, paste to Terminal.app and hit Enter | |
sqlite3 "$HOME/Library/Application Support/Skype/<your_skype_username>/main.db" | |
#then copy this one, paste to Terminal.app where sqlite3 running and hit Enter | |
delete from Messages where dialog_partner = '<delete_history_of_conversation_with_particurarly_username>'; |
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
--- 123.html | |
+++ (clipboard) | |
@@ -183,7 +183,7 @@ | |
.main { | |
- | |
+ background:url(/i/login/field.jpg) 50% 64%; | |
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
- (void)saveArrayOfImages:(NSMutableArray *)arrayOfImages | |
{ | |
for (UIImage *imageObject in arrayOfImages) | |
{ | |
dispatch_queue_t backgroundQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0); | |
dispatch_async(backgroundQueue, ^{ | |
NSManagedObjectContext *context = [appDelegate managedObjectContext]; | |
NSData *dataFromImage = UIImagePNGRepresentation(imageObject); | |
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
NSString *string = [NSString stringWithUTF8String: @"http://президент.рф"]; | |
NSURL *url = [NSURL URLWithString:[string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; | |
After this operations I check NSURL with: | |
[[UIApplication sharedApplication] canOpenURL:url] | |
canOpenURL return true. Then I open this NSURL at build-in browser Safari, | |
Safari told me that this page cannot be opened | |
(encoded URL seems like: http://xn--d1abbgf6aiiy.xn--p1ai), | |
after this I just press Refresh at browser without any additional actions |
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
set volume_path_to_disable to POSIX path of "/Volumes/Macintosh HD/" | |
set volume_path_to_enable to POSIX path of "/Volumes/OS X Mountain Lion" | |
set command to "mdutil -d " & quoted form of volume_path_to_disable & "&&" & "mdutil -i on " & quoted form of volume_path_to_enable | |
do shell script command with administrator privileges |
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
/* 1 - непосредственно в интерфейсе класса (*.h) */ | |
@interface IVExample : NSObject { | |
NSString *string; | |
int number; | |
} | |
@end |
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
/* 2 - в class extension */ | |
@interface IVExample () { | |
NSString *string; | |
int number; | |
} | |
@end |
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
/* 3 - в начале имплементации класса (*.m) */ | |
@implementation IVExample () { | |
NSString *string; | |
int number; | |
} | |
... | |
@end |
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
# navigation | |
# ctrl + A - moves to the start of the line | |
# ctrl + E - moves to the end of the line | |
# ctrl + B - move back on character | |
# ctrl + F - move forward one character | |
# esc + B - move back one word | |
# esc + F - move forward one word | |
# alt + <-/-> | |
# ctrl + U - delete from the cursor to the beginning of the line | |
# ctrl + K - delete from the cursor to the end of the line |
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
#!/bin/bash | |
# by Artyom Loenko aka dive (artyom.loenko@mac.com) | |
# Usage: | |
# - download this script | |
# - open Terminal.app | |
# - goto to Folder where script downloaded | |
# - run 'chmod +x fix_skype_conversation_icons_retina.sh' | |
# - then run './fix_skype_conversation_icons_retina.sh' |
OlderNewer