Skip to content

Instantly share code, notes, and snippets.

View OmidH's full-sized avatar

Omid Hashemi OmidH

View GitHub Profile
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.Networking.NetworkSystem;
using System.Collections;
public class Connector : MonoBehaviour {
int connectionAttemptCount;
NetworkClient client;
bool errorHappened;
void Start () {
StartClient ();
//
// TCHorizontalSelectorView.m
// TwinCodersLibrary
//
// Created by Guillermo Gutiérrez on 16/01/13.
// Copyright (c) 2013 TwinCoders S.L. All rights reserved.
//
#import <UIKit/UIKit.h>
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
@OmidH
OmidH / gist:5933353
Created July 5, 2013 09:38
gitignore Android studio
*.iml
.idea
build
@OmidH
OmidH / gist:5933317
Created July 5, 2013 09:34
gitignore xcode
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.1
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
# - added line-by-line explanations for EVERYTHING (some were missing)
#
@OmidH
OmidH / gist:4608487
Created January 23, 2013 15:51
3d transform
[UIView beginAnimations:nil context:nil];
CATransform3D _3Dt = CATransform3DRotate(self.view.layer.transform,3.14, 1.0, 0.0,0.0);
[UIView setAnimationRepeatCount:5];
[UIView setAnimationDuration:5];
self.view.layer.transform=_3Dt;
[UIView commitAnimations];
@OmidH
OmidH / gist:4577369
Last active December 11, 2015 09:08
minmal Table View Delegates (for copy paste)
#pragma mark - UITableView
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CellIdentifier";