Skip to content

Instantly share code, notes, and snippets.

View spase84's full-sized avatar
:octocat:
Work hard

Petrenko Maxim spase84

:octocat:
Work hard
  • Russia, Krasnodar
  • 12:26 (UTC +03:00)
View GitHub Profile
@spase84
spase84 / Count lines of code in Xcode project
Created December 6, 2017 13:14 — forked from Tokuriku/Count lines of code in Xcode project
Count lines of code in SWIFT Xcode project
1. Open Terminal
2. cd to your Xcode project
3. Execute the following when inside your target project:
find . -name "*.swift" -print0 | xargs -0 wc -l
//
// Router.swift
//
// Created by Maksim Petrenko on 22.10.16.
// Copyright © 2017 MaxPayne. All rights reserved.
//
import UIKit
let appRouter = Router()
extension UIButton {
func imageWithColor(color: UIColor) -> UIImage {
var rect = CGRectMake(0, 0, self.frame.width, self.frame.height)
UIGraphicsBeginImageContext(rect.size)
var context = UIGraphicsGetCurrentContext()
CGContextSetFillColorWithColor(context, color.CGColor)
CGContextFillRect(context, rect);
#import <Foundation/Foundation.h>
@interface Communicator : NSObject <NSStreamDelegate> {
@public
NSString *host;
int port;
}
- (void)setup;
# Compile PCRE - Perl Compatible Regular Expressions
cd /usr/local/src
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.31.tar.gz
tar -xvzf pcre-8.31.tar.gz
cd pcre-8.31
./configure
make
sudo make install
# Compile Autoconf
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core curl
apt-get -y install libssl-dev
apt-get -y install libreadline5 libreadline5-dev
apt-get -y install zlib1g zlib1g-dev
# for passenger needed
@spase84
spase84 / pow
Created August 12, 2011 02:43 — forked from ches/pow
A quick script to switch between running Pow and Apache on OS X
#!/bin/sh -e
#/ Usage: pow [on|off]
#/ Toggle between running Pow (http://pow.cx) and Apache on Mac OS X.
# Show Usage
function usage {
grep '^#/' "$0" | cut -c4-
exit 2
}
[ -z "$1" -o "$1" = "--help" ] && usage