Skip to content

Instantly share code, notes, and snippets.

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

Eugene Hauptmann eugenehp

🔬
DeepTech, FinTech, BioTech, Robotics, AI.
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 / output
Created September 29, 2012 23:13
parse images
var http = require('http');
var jsdom = require('jsdom');
var url = "http://deathtoglamour.com/articles/695-top-ten-sexiest-exploits-of-uk-olympic-gold-medal-winners-hopefully";
var options = {
host: 'deathtoglamour.com',
port: 80,
path: '/articles/695-top-ten-sexiest-exploits-of-uk-olympic-gold-medal-winners-hopefully',
method: 'GET'
};
@eugenehp
eugenehp / output
Created October 5, 2012 16:41
parser
This file has been truncated, but you can view the full file.
Last login: Mon Oct 1 14:46:27 on ttys000
wifi-028036:~ iii$ cd test
wifi-028036:test iii$ ls
grab_image.js node_modules
wifi-028036:test iii$ clear
@eugenehp
eugenehp / gist:3875865
Created October 11, 2012 22:14
SMPP nodejs daemon root
#!/usr/local/bin/node
/**
* This file is part of Shorty.
*
* Shorty is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3 of the License.
*
* Shorty is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@eugenehp
eugenehp / gist:3875877
Created October 11, 2012 22:16
some SMPP definitions
exports.command_ids = { // Use command_ids to look up by ID
0x80000000: 'generic_nack',
0x00000001: 'bind_receiver',
0x80000001: 'bind_receiver_resp',
0x00000002: 'bind_transmitter',
0x80000002: 'bind_transmitter_resp',
0x00000003: 'query_sm',
0x80000003: 'query_sm_resp',
0x00000004: 'submit_sm',
0x80000004: 'submit_sm_resp',
@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 / Makefile
Created November 20, 2012 21:12
librtmp make file for mac os x
VERSION=v2.4
prefix=/usr/local
incdir=$(prefix)/include/librtmp
bindir=$(prefix)/bin
libdir=$(prefix)/lib
mandir=$(prefix)/man
BINDIR=$(DESTDIR)$(bindir)
INCDIR=$(DESTDIR)$(incdir)
@eugenehp
eugenehp / red5-server-installation.sh
Created November 21, 2012 23:08
Red5 on Ubuntu 12.10
#!/bin/sh
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install unzip default-jdk default-jre htop
cd ~
wget http://red5.org/downloads/red5/1_0/red5-1.0.0-RC2.zip
unzip red5-1.0.0-RC2.zip
chmod +x ./red5.sh
./red5.sh
// demo.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <MqOaI.h>
extern "C"
{
#include "../../common/common.h"
#include "../../common/cpu.h""
#include "../../x264.h"
#include "../../encoder/set.h"
@eugenehp
eugenehp / yasm installation script
Created November 24, 2012 23:32
preparation for libx264 compilation
#!/bin/sh
echo "yasm installation script for Mac OS X 10.8.2"
echo "you should have brew installed!"
git clone git://github.com/yasm/yasm.git
cd yasm
brew install autoconf automake
sh ./autogen.sh
./configure