Skip to content

Instantly share code, notes, and snippets.

Set username
git config --global user.name "Your Name Here"

Set e-mail
git config --global user.email "your_email@example.com"

Clorize and make git output pretty
git config --global color.ui true

Creating a repository

# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java
/*
Usage
NSString *password = @"1111";
NSString *message = @"xxx";
NSData *inData = [message dataUsingEncoding:NSUTF8StringEncoding];
NSData *encData = [securityUtils encryptPBEWithMD5AndDESData:inData password:password];
NSString *encString = [encData base64EncodedString];
@synthesize firstName = _firstName;
@synthesize txtFirstName = _txtFirstName;
[RACAbleSelf(self.firstName) subscribeNext:^(id x) { [self firstNameChanged:x]; }];
[self rac_bind:RAC_KEYPATH_SELF(self.firstName) to:self.txtFirstName.rac_textSubscribable];
- (void) firstNameChanged:(id)firstName {
NSLog(@"changed: %@", firstName);
}
@interface ViewController ()
@property (strong, nonatomic) UIScrollView* vScrollView;
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
@bleeckerj
bleeckerj / NSDataExtensions.swift
Created February 3, 2017 04:18 — forked from tanner0101/NSDataExtensions.swift
Convert to and from NSData for common Swift types. Includes Eddystone URL conversion.
//
// NSData.swift
// Pods
//
// Created by Tanner Nelson on 9/15/15.
//
//
import Foundation
@bleeckerj
bleeckerj / happy_git_on_osx.md
Created February 10, 2017 19:37 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@bleeckerj
bleeckerj / .gitignore
Created March 20, 2017 06:10 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@bleeckerj
bleeckerj / .gitignore
Created March 21, 2017 12:57
.gitignore for Xcode 7.x and Swift 2.x
#########################
# .gitignore file for Xcode 7 Source Projects
# can be used for watchOS, tvOS, iOS, OSX, Swift development
#
# February 2016
#
# Save this file as .gitignore in your repository's working directly.
# Note: Don't confuse the working directory with the .git directory. It will not work if you put it there.
#
#####
@bleeckerj
bleeckerj / ViewController.swift
Created April 5, 2017 16:05 — forked from huguesbr/ViewController.swift
Sample RxBluetoothKit implementation
import UIKit
import CoreBluetooth
import RxSwift
import RxBluetoothKit
extension CBUUID {
var type: UUID {
return UUID(rawValue: uuidString)!
}