Skip to content

Instantly share code, notes, and snippets.

View bimawa's full-sized avatar
:octocat:
Githubing

Maxim Bunkov bimawa

:octocat:
Githubing
View GitHub Profile
//
// UACellBackgroundView.h
// Ambiance
//
// Created by Matt Coneybeare on 1/31/10.
// Copyright 2010 Urban Apps LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
//
// UACellBackgroundView.m
// Ambiance
//
// Created by Matt Coneybeare on 1/31/10.
// Copyright 2010 Urban Apps LLC. All rights reserved.
//
#define TABLE_CELL_BACKGROUND { 1, 1, 1, 1, 0.866, 0.866, 0.866, 1} // #FFFFFF and #DDDDDD
#define kDefaultMargin 10
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier {
if (self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier]) {
// Background Image
self.backgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease];
}
return self;
}
- (void)setPosition:(UACellBackgroundViewPosition)newPosition {
@mattikus
mattikus / gist:856946
Created March 6, 2011 02:01
two attempts to connect to freenode with weechat-git
19:45:09 freenode | irc: reconnecting to server...
19:45:09 freenode | irc: connecting to server chat.us.freenode.net/7070 (SSL)...
19:45:09 freenode | gnutls: connected using 1024-bit Diffie-Hellman shared secret exchange
19:45:09 freenode =!= | gnutls: peer's certificate is NOT trusted
19:45:09 freenode =!= | gnutls: peer's certificate issuer is unknown
19:45:09 freenode | gnutls: receiving 2 certificates
19:45:09 freenode | - certificate[1] info:
19:45:09 freenode | - subject `OU=Domain Control Validated,OU=Gandi Standard Wildcard SSL,CN=*.freenode.net', issuer `C=FR,O=GANDI SAS,CN=Gandi Standard SSL CA', RSA key 2048 bits, signed using
| RSA-SHA1, activated `2011-01-14 00:00:00 UTC', expires `2012-01-14 23:59:59 UTC', SHA-1 fingerprint `acd50e69ad93f5db08fefb67180d871415858664'
19:45:09 freenode | - certificate[2] info:
@zbyhoo
zbyhoo / solve_pbxproj_merge_conflict.sh
Created May 5, 2011 09:00
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
@wess
wess / UIButton+Addition.h
Created January 21, 2012 16:00
added setBackground for event to UIButton
#import <UIKit/UIKit.h>
@interface UIButton(WCButton)
@property (nonatomic, retain) NSMutableDictionary *backgrounds;
- (void) setBackgroundColor:(UIColor *)bgColor forState:(UIControlState)state;
@end
@1stvamp
1stvamp / mac-curl-ca-bundle.sh
Created March 22, 2012 12:50
Script to install cURL CA certificates on OS X without macports
#!/bin/bash
mkdir /tmp/curl-ca-bundle
cd /tmp/curl-ca-bundle
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2
tar xzf curl-7.22.0.tar.bz2
cd curl-7.22.0/lib/
./mk-ca-bundle.pl
if [ ! -d /usr/share/curl/ ]; then
sudo mkdir -p /usr/share/curl/
else
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@irace
irace / gist:3363569
Created August 15, 2012 20:54
Generate iOS Localizable.strings format from PO file
#!/usr/bin/python
import sys
if __name__ == '__main__':
filename = sys.argv[1];
input = open(filename)
output = open(filename + '.out', 'w')
for line in input:
@turtlesoupy
turtlesoupy / SFSConfettiScreen.m
Created September 16, 2012 09:11
Confetti particle system for iOS5+
//
// Created by tdimson on 8/15/12.
#import <QuartzCore/QuartzCore.h>
#import "SFSConfettiScreen.h"
@implementation SFSConfettiScreen {
__weak CAEmitterLayer *_confettiEmitter;
CGFloat _decayAmount;