Skip to content

Instantly share code, notes, and snippets.

View dive's full-sized avatar
👹

Artem Loenko dive

👹
View GitHub Profile
@dive
dive / gist:2977633
Created June 23, 2012 08:59
instance variables (declare in implementation)
/* 3 - в начале имплементации класса (*.m) */
@implementation IVExample () {
NSString *string;
int number;
}
...
@end
@dive
dive / fix_skype_conversation_icons_retina.sh
Created August 4, 2012 19:30
Fix the size of avatars in the Skype conversation screen for Retina Macbook Pro screen
#!/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'
@dive
dive / resign.sh
Created September 14, 2012 14:58 — forked from RichardBronosky/resign.sh
A simple tool for resigning an iOS app ipa with a new certificate/mobileprovision
#!/usr/bin/env bash
if [[ ! ( # any of the following are not true
# 1st arg is an existing regular file
-f "$1" &&
# ...and it has a .ipa extension
"${1##*.}" == "ipa" &&
# 2nd arg is an existing regular file
-f "$2" &&
@dive
dive / iso-639-1_from_russian_names.m
Created October 31, 2012 21:52
languages value from russian names
//
// main.m
// LocaleChecker
//
// Created by Artyom Loenko on 11/1/12.
// Copyright (c) 2012 Artyom Loenko. All rights reserved.
//
#import <Foundation/Foundation.h>
@dive
dive / self.self.self.m
Last active December 16, 2015 17:09
Self abandoned by self abandoned.
#import <Foundation/Foundation.h>
@interface TestSelfSelfer : NSObject
@property (nonatomic, strong) NSString *string;
@property (nonatomic, strong) TestSelfSelfer *sself;
@end
@implementation TestSelfSelfer
@dive
dive / skype_history.sh
Created January 29, 2012 20:08
open Skype DB with history and remove some items (Mac OS)
# 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>';
import UIKit
public final class FrameworkPackage {
public init () { }
public func randomColor() -> UIColor {
return UIColor.random
}
}
public extension UIColor {
import UIKit
import class ios_framework_package.FrameworkPackage
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = FrameworkPackage().randomColor()
}
@dive
dive / SPM:Article:Platforms.swift
Created February 25, 2019 12:17
SPM:Article:Platforms
platforms: [ .iOS(.v12) ]
@dive
dive / SPM:Article:Swift:Package.sh
Created February 25, 2019 12:20
SPM:Article:Swift:Package
swift package init --type library