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 / install.sh
Created November 27, 2012 23:01
ffmpeg easy installation
#!/bin/sh
# read more http://mxcl.github.com/homebrew/
echo 'Installing homebrew'
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
echo 'installing ffmpeg now'
brew install ffmpeg

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links

@eugenehp
eugenehp / reverse-ip-lookup.js
Created July 8, 2012 14:58
node.js IP reverse lookup
var dns = require('dns');
function reverseLookup(ip) {
dns.reverse(ip,function(err,domains){
if(err!=null) callback(err);
domains.forEach(function(domain){
dns.lookup(domain,function(err, address, family){
console.log(domain,'[',address,']');
console.log('reverse:',ip==address);
@eugenehp
eugenehp / node-chrome
Created June 26, 2012 13:46
Node.js spawn and control Google Chrome
var express = require('express');
var cp = require('child_process');
var app = express.createServer();
var chrome_count = 0;
app.get('/', function(req, res){
startChrome(chrome_count++,9222,function chromeStared(err,id,chrome){
res.send('Chrome '+id+' Started\r\n');
@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 / AndroidManifest.xml
Created April 19, 2021 16:08
Deep linking on Android
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.billingapp">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
@eugenehp
eugenehp / benchmark.ts
Created April 19, 2021 04:07
RNBenchmark
suite
.add('expo-random [Sync]', () => {
getRandomBytes(SIZE);
})
.add('expo-random [Async]', async () => {
await getRandomBytesAsync(SIZE);
})
.add('react-native-randomness', () => {
randomnessRandomBytes(SIZE);
})
@eugenehp
eugenehp / gatsby-config.js
Created April 12, 2021 00:24
gatsby-source-medium-backup integration
const markdownPages = `${__dirname}/src/markdown-pages`
module.exports = {
plugins: [
{
resolve: `gatsby-source-medium-backup`,
options: {
source: `${__dirname}/medium-export.zip`,
destination: markdownPages,
},
@eugenehp
eugenehp / json_endpoint.json
Created April 11, 2021 23:33
Unofficial Medium API endpoint
])
}while(1);</x>{
"success": true,
"payload": {
"user": {
"userId": "dc9e3fa402bd",
"name": "Eugene Hauptmann",
"username": "eugenehauptmann",
"createdAt": 1615565124899,
"imageId": "1*J0OI-J0hjTQ14-3JEzmgtw.jpeg",
@eugenehp
eugenehp / example.js
Created April 6, 2021 04:27
reddit question
// https://www.reddit.com/r/react/comments/mkuhg4/how_do_i_handle_this_i_want_to_set_state_on_lots/
const data = {
'loc': 'location',
'svc': 'serviceType',
'decorator': 'decorator',
...
};
const handleChange = (e) => {