Skip to content

Instantly share code, notes, and snippets.

View abhishekbedi1432's full-sized avatar

Abhishek Bedi abhishekbedi1432

View GitHub Profile
@abhishekbedi1432
abhishekbedi1432 / Pod-Install.sh
Last active September 19, 2020 10:40
Script to install pods in the project directory using Apple Script and Terminal
#!/bin/sh
osascript <<END
tell application "Terminal"
if not (exists window 1) then reopen
activate
do script "cd `pwd`;pod install" in window 1
end tell
END
@abhishekbedi1432
abhishekbedi1432 / UITableViewWithSwitchableDatasources.swift
Last active July 22, 2017 08:18
Using different datasources with the same UITableView
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
//: Protocols
protocol TableViewDisplayable {
var title:String {get set}
}
@abhishekbedi1432
abhishekbedi1432 / UITableView.swift
Last active July 22, 2017 07:38 — forked from watert/UITableView.swift
UITableView example in iOS Playground in Swift 3
import UIKit
import XCPlayground
class ViewController: UIViewController {
var tableView: UITableView!
var items = ["Apple","Mango","Grapes"]
override func viewDidLoad() {
super.viewDidLoad()
@abhishekbedi1432
abhishekbedi1432 / codility-demo.js
Created July 18, 2017 11:00 — forked from mourner/codility-demo.js
Codility demo tests solutions
// 100-score solution for http://codility.com/demo/take-sample-test/
function equi(array) {
var i,
len = array.length,
sum = 0,
leftSum = 0,
rightSum;
for (i = 0; i < len; i++) {
#!/bin/sh
# Simple iOS build script
# Written by Aron Bury, 29/11/2011
appname="AwesomeApp"
target_name="$appname"
sdk="iphoneos"
certificate="iPhone Developer: Joe Blogs"