Skip to content

Instantly share code, notes, and snippets.

View xslim's full-sized avatar

Taras Kalapun xslim

View GitHub Profile
@xslim
xslim / deploy.rb
Created May 15, 2012 02:08 — forked from jeronimo/deploy.rb
Capistrano recipe to sync rails MongoDB and files
set :sync_directories, ["public/system/images"]
set :sync_backups, 3
set :db_file, "mongoid.yml"
set :db_drop, '--drop' # drop database (rewrites everything)
@xslim
xslim / solve_pbxproj_merge_conflict.sh
Created February 10, 2012 15:47 — forked from zbyhoo/solve_pbxproj_merge_conflict.sh
Solving pbxproj files git merge conflicts when two users add files at the same time.
#!/bin/sh
projectfile=`find -d . -name 'project.pbxproj'`
projectdir=`echo *.xcodeproj`
projectfile="${projectdir}/project.pbxproj"
tempfile="${projectdir}/project.pbxproj.out"
savefile="${projectdir}/project.pbxproj.mergesave"
cat $projectfile | grep -v "<<<<<<< HEAD" | grep -v "=======" | grep -v "^>>>>>>> " > $tempfile
cp $projectfile $savefile
@xslim
xslim / addDebugSettingsChild.sh
Created February 9, 2012 17:22 — forked from daveverwer/build.rb
Scripts to play with Settings.bundle
#!/bin/sh
# addDebugSettingsChild.sh
#
# Simple script to inject a Debug menu in an iPhone Settings plist.
#
# created 10.15.2008 by Andy Mroczkowski, mrox.net
THIS="`basename $0`"
PLISTBUDDY="/usr/libexec/PlistBuddy -x"
@xslim
xslim / AutoLocalize.h
Created December 10, 2011 20:57 — forked from sma/AutoLocalize.h
Automatically localize all strings in XIB files settable by IB
//
// AutoLocalize.h
// AutoLocalize
//
// Created by Stefan Matthias Aust on 05.08.11.
// Copyright 2011 I.C.N.H. All rights reserved.
//
#import <UIKit/UIKit.h>
@xslim
xslim / rails-template.rb
Created June 28, 2011 19:05
Rails 3 App Template with JQuery, Mongoid, Compass, HAML & Barista
# rails new NAME -OJ -m https://gist.github.com/raw/903515/rails-template.rb
remove_file 'README'
remove_file 'public/index.html'
remove_file 'public/images/rails.png'
prepend_file 'config/boot.rb' do <<-RB
begin
require 'yaml'
YAML::ENGINE.yamler = 'syck'