Skip to content

Instantly share code, notes, and snippets.

@andriitishchenko
andriitishchenko / .proxy_helper
Last active December 12, 2022 21:37 — forked from refo/macOS proxy settings from terminal.md
macOS proxy settings from terminal
# Macos Proxy Helper (networksetup wraper)
# add this line to $HOME/.zshrc
#
# source "$HOME/.proxy_helper"
#
# usage :
# proxy < | up | down > [-all || -http|-https|-socks|-ftp|-stream ]
# proxy set <destination> <port> [-http|-https|-socks|-ftp|-stream || -all]'
/* example usage */
JFFollowRedirect* follower = [[JFFollowRedirect alloc] init];
[follower addObserver:self forKeyPath:@"redirectStr" options:NSKeyValueObservingOptionNew
context:follower];
// follow redirect
[follower getRedirectURLStr:urlToFollow];
/ * header */
#import <Foundation/Foundation.h>
@andriitishchenko
andriitishchenko / Communicator.h
Created August 11, 2021 08:02 — forked from eugenehp/Communicator.h
How to open a TCP socket in Objective-C
#import <Foundation/Foundation.h>
@interface Communicator : NSObject <NSStreamDelegate> {
@public
NSString *host;
int port;
}
- (void)setup;
@andriitishchenko
andriitishchenko / XcodeBuildSettingsReference.md
Created July 9, 2021 10:23 — forked from tkersey/XcodeBuildSettingsReference.md
The Xcode Build Settings Reference in a searchable document, as of Xcode 8.3.2

Build settings reference

Active Build Action (ACTION)

A string identifying the build system action being performed.

Additional SDKs (ADDITIONAL_SDKS)

The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.

Alternate Install Group (ALTERNATE_GROUP)

@andriitishchenko
andriitishchenko / manipulating-plist-in-macos-cli.md
Created January 5, 2021 16:26 — forked from fallroot/manipulating-plist-in-macos-cli.md
Manipulating Property List in macOS Command Line

Manipulating Property List in macOS Command Line

Tools

⚠️ defaults 명령어는 홈 경로(~)는 인식하지만 상대 경로(., ..)는 인식하지 않는다.

@andriitishchenko
andriitishchenko / Create iOS Icons.jsx
Created August 21, 2019 09:47 — forked from twonjosh/Create iOS Icons.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@andriitishchenko
andriitishchenko / README.md
Created February 14, 2019 12:47 — forked from hofmannsven/README.md
My simply Git Cheatsheet
import Cocoa
import CoreBluetooth
import PlaygroundSupport
class BTHelper: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate {
var centralManager: CBCentralManager
override init() {
self.centralManager = CBCentralManager(delegate: nil, queue: nil)
super.init()
@andriitishchenko
andriitishchenko / openssl_commands.md
Created May 18, 2018 11:55 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
// http://www.html5rocks.com/en/tutorials/es6/promises/
function get(url) {
// Return a new promise.
return new Promise(function(resolve, reject) {
// Do the usual XHR stuff
var req = new XMLHttpRequest();
req.open('GET', url);
req.onload = function() {