Skip to content

Instantly share code, notes, and snippets.

View eugenehp's full-sized avatar
🔬
DeepTech, FinTech, BioTech, Robotics, SEO.

Eugene Hauptmann eugenehp

🔬
DeepTech, FinTech, BioTech, Robotics, SEO.
View GitHub Profile
@eugenehp
eugenehp / Communicator.h
Created July 29, 2012 22:18 — forked from rjungemann/Communicator.h
How to open a TCP socket in Objective-C
#import <Foundation/Foundation.h>
@interface Communicator : NSObject <NSStreamDelegate> {
@public
NSString *host;
int port;
}
- (void)setup;
@eugenehp
eugenehp / MyAVController.m
Created October 27, 2012 01:39 — forked from benlodotcom/MyAVController.h
A little demo snippet that you can use to access directly the camera video in IOS4
#import "MyAVController.h"
@implementation MyAVController
@synthesize captureSession = _captureSession;
@synthesize imageView = _imageView;
@synthesize customLayer = _customLayer;
@synthesize prevLayer = _prevLayer;
@eugenehp
eugenehp / .gitignore
Created February 19, 2013 10:24 — 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,
//
// CRUD API for RESTful services with URLs similar 'http://services.mysite.com/classes/Book'.
//
// e.g. parse.get(
// "Book",
// 123,
// function(response){ console.log(response.toString());}
// );
//
services.factory('parse', function($rootScope, $http) {
@eugenehp
eugenehp / libsox.m
Created April 24, 2013 05:21 — forked from fbettag/libsox.m
#import "sox.h"
- (NSString *)transformAudioFileAtPath:(NSString *)path profile:(int)tprofile {
static sox_format_t *in, *out; /* input and output files */
sox_effects_chain_t * chain;
sox_effect_t * e;
char *args[10];
NSString *target = [path stringByReplacingOccurrencesOfString:@".0.wav" withString:[NSString stringWithFormat:@".%i.wav", tprofile]];
target = [target stringByReplacingOccurrencesOfString:@"Hoersimulator.app" withString:@"Documents"];
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
# /etc/network/interfaces
#
auto lo
iface lo inet loopback
# device: eth0
iface eth0 inet manual
# IPv4 bridge
# (connect ONLY your firewall/router KVM instance here, this is the WAN device!)
#!/bin/bash
###########################################################################
# Choose your ffmpeg version and your currently-installed iOS SDK version:
#
VERSION="2.0.2"
SDKVERSION="7.0"
#
#
###########################################################################
var mongoose = require('./../mongoose');
mongoose.connect('localhost', 'testing_enumarray');
var ok = 'car figure'.split(' ');
function validator (v) {
return v.every(function (val) {
return !!~ok.indexOf(val)
});

Setup Mac OS X Mountain Lion

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the process, but TBH I have this laptop for almost 3yrs and this is the first time I needed to reinstall everything, maybe the next time...