Skip to content

Instantly share code, notes, and snippets.

View alokc83's full-sized avatar
🚀
Open to new opportunities

Alok Choudhary alokc83

🚀
Open to new opportunities
View GitHub Profile
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@alokc83
alokc83 / xcode-build-number-generator.sh
Last active August 25, 2021 07:57
Automaticvally create build number every time using curent day, month and year
#!/bin/sh
# xcode-build-number-generator.sh
# @desc Automaticvally create build number every time using curent day, month and year
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
@alokc83
alokc83 / xcode-versionString-generator.sh
Last active December 15, 2015 06:59
<<<<<<<<<< STILL IN ALPHA, HAVING SOME MAJOR KNOWN BUG. USE IT ON YOUR RESPONSIBILITY >>>>>>>>>>>>>>> KNOWN ISSUES : 1] Not able to handle major and minor version change. This automatic version generator. basis of following format Major version.Minor Version.Revision It keeps updating the revision. This script automatically add two custom proper…
# xcode-version-generator.sh
# @desc Auto-increment the version number (only) when a project is archived for export.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Check the checkbox "Run script only when installing"
# 6. Drag the "Run Script" below "Link Binaries With Libraries"
# 7. Insure your starting version number is in SemVer format (e.g. 1.0.0)
# Mac OS X
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
Three ways of excluding files.
Almost every git user knows about adding a .gitignore file to root of the project to control the visibility of files and folders. Because this file is in the repository; this configuration also applies to remote repositories of the project. But it’s not the only way. I’m going to tell you how to get Git to ignore files on a per computer and per repository basis. These could be better choices in some circumstances.
There are three types of exclude files; from highest to lowest order of precedence they are:
Per Project: .gitignore file in the repository
This is the usual way of adding an ignore file. Call it .gitignore and save it to the root of your project to apply to all the files (you can add different .gitignore files in subdirectories where they have lesser scope). It is a part of the repository, so it will need to be git-added and committed for each change. This is useful for repositories that are passed around with others who may not have a per computer exclude file, or
@alokc83
alokc83 / rootUserEnableInOSX
Created April 15, 2013 03:28
how to enable root user
OS X Lion
From the Apple menu choose System Preferences....
From the View menu choose Users & Groups.
Click the lock and authenticate as an administrator account.
Click Login Options....
Click the "Edit..." or "Join..." button at the bottom right.
Click the "Open Directory Utility..." button.
Click the lock in the Directory Utility window.
Enter an administrator account name and password, then click OK.
@alokc83
alokc83 / format specifiers in pebble programming
Created June 16, 2013 17:49
format specifier in strftime, or time format in time function in pebble programming
Parameters
format
The following characters are recognized in the format parameter string
format Description Example returned values
Day --- ---
%a An abbreviated textual representation of the day Sun through Sat
%A A full textual representation of the day Sunday through Saturday
%d Two-digit day of the month (with leading zeros) 01 to 31
%e Day of the month, with a space preceding single digits. Not implemented as described on Windows. See below for more information. 1 to 31
//
// UITabBarController+HideTabBar.h
//
// Created by Joshua Greene on 9/26/13.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@alokc83
alokc83 / .gitignore
Created December 24, 2013 15:38 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,