Skip to content

Instantly share code, notes, and snippets.

View mertsimsek's full-sized avatar
:shipit:
hey!

Mert Simsek mertsimsek

:shipit:
hey!
View GitHub Profile
# credit: http://haacked.com/archive/2014/07/28/github-flow-aliases/
[user]
email = salim.kayabasi@gmail.com
name = Salim KAYABASI
[core]
autocrlf = input
# editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin
editor = /Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl -n -w
eol = lf
[color]
@mertsimsek
mertsimsek / besiege.sh
Last active August 29, 2015 14:17
Besiege Auto Readme Generator
git pull origin master
rm README.md
touch README.md
echo "# PREVIEWS OF VEHICLES" >> README.md
echo "## In the list below, you can see previews of vehicles that seen here." >> README.md
echo "---" >> README.md
for ext in png; do
files=( "Thumbnails/"*."$ext" )
@dtrauger
dtrauger / ios-create-gradient-background
Last active June 24, 2020 14:45
Create Gradient Background for View in Objective C
// Create the colors
UIColor *topColor = [UIColor colorWithRed:50.0/255.0 green:50.0/255.0 blue:50.0/255.0 alpha:1.0];
UIColor *bottomColor = [UIColor colorWithRed:56.0/255.0 green:56.0/255.0 blue:56.0/255.0 alpha:1.0];
// Create the gradient
CAGradientLayer *theViewGradient = [CAGradientLayer layer];
theViewGradient.colors = [NSArray arrayWithObjects: (id)topColor.CGColor, (id)bottomColor.CGColor, nil];
theViewGradient.frame = theView.bounds;
//Add gradient to view
  • Create new repository

git init

  • Add changes to Index

git add .

  • Commit changes

git commit -m "Why?"

  • Repository status
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# 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)
@rkhmelyuk
rkhmelyuk / gist:1277969
Created October 11, 2011 12:37
Performance Optimisations for Android

Short summary from http://developer.android.com/guide/practices/design/performance.html

  • avoid creating objects if you don’t need them
  • avoid allocation memory if you can work without it
  • two parallel arrays of ints are also a lot more efficient than an array of (int,int) objects
  • array of ints is preferred than array of Integers
  • avoid creating short-term temporary objects if you can
  • make your method static. Invocations will be about 15%-20% faster. It's also good practice, because you can tell from the method signature that calling the method can't alter the object's state.
  • It's reasonable to follow common object-oriented programming practices and have getters and setters in the public interface, but within a class you should always access fields directly.
  • direct field access is about 7x faster than invoking a trivial getter