Skip to content

Instantly share code, notes, and snippets.

View n0an's full-sized avatar

Anton Novoselov n0an

View GitHub Profile
@n0an
n0an / ios-questions-interview.md
Created April 25, 2016 10:53 — forked from arturlector/ios-questions-interview.md
Вопросы на собеседование iOS разработчика.

Вопросы на собеседование iOS разработчика (дополненное издание):

General:

  • Что такое полиморфизм?

  • Что такое *инкапсуляция? Что такое *нарушение инкапсуляции?

  • Чем абстрактный класс отличается от интерфейса?

  • Расскажите о паттерне MVC. Чем отличается пассивная модель от активной?

Close the project in XCode
Delete the following files using the Terminal. Where “myproject” is the name your project.
rm -rf myproject.xcworkspace/xcuserdata
rm -rf myproject.xcodeproj/xcuserdata
rm -rf myproject.xcodeproj/project.xcworkspace
override func prepareForReuse() {
super.prepareForReuse()
profileImageView.image = nil
usernameTopButton.setTitle("", forState: .Normal)
dateLabel.text = nil
profileImageDownloadTask?.cancel()
profileImageDownloadTask = nil
}
wiztree program
http://download.cnet.com/WizTree/3000-2248_4-75816793.html
@n0an
n0an / KeyChainWrapper.swift
Created January 30, 2017 10:49 — forked from anishparajuli555/KeyChainWrapper.swift
This gist demonstrates how to save authentication token on Keychain
//SAMPLE CODE FROM APPLE
//https://developer.apple.com/library/content/samplecode/GenericKeychain/Listings/README_md.html
enum Key {
//...
//....
enum Headers {
static let Authorization = "Authorization"
static let ContentType = "Content-Type"
https://technet.microsoft.com/en-us/library/cc772785(WS.10).aspx#BKMK_create
* To list tasks:
schtasks /query | more
* To delete task named 'stackoverflow':
schtasks.exe /delete /tn stackoverflow
* To create task named 'stackoverflow', run every 5 hours, first run at 12:27:
schtasks /create /sc hourly /st 12:27 /mo 5 /tn "stackoverflow" /tr 'python C:\stackoverflowEveryday.py'
@n0an
n0an / GitCheatSheet
Last active September 4, 2017 17:32
### Shortlog
git shortlog
* -n
* -sn
### Amend LAST commit (message or files):
git commit --amend -m "Added some files or just edited comm message"
@n0an
n0an / Heroku Swift Deployment
Created April 21, 2017 07:17
How to deploy swift server app to heroku
First create a new file called Procfile in the root of your project and add the following to it.
web: myFirstKituraProject
$ heroku create --buildpack https://github.com/kylef/heroku-buildpack-swift.git
@n0an
n0an / linux django
Last active April 28, 2017 08:06
linux django
===== INITIALIZE PROJECT ====
-- Create virtual environment on Desktop:
cd ~/Desktop
virtualenv myvirtualenv/foodtasker
*** macOS:
python3 -m venv myvirtualenv/foodtasker
-- Activate virtual environment:
source myvirtualenv/foodtasker/bin/activate
- CONVERT TOKEN:
http://192.168.131.128:8000/api/social/convert-token/
PARAMS:
grant_type: convert_token
client_id: FROM DJANGO ADMIN APPLICATIONS
client_secret: FROM DJANGO ADMIN APPLICATIONS
backend: facebook
token: FROM FACEBOOK
- REVOKE TOKEN: