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
.notification-badge {
position: relative;
}
.notification-badge[data-badge-count]:after {
content: attr(data-badge-count);
background: #FDFC3A;
color: #000;
border-radius: 12px;
font-size: 9px;
@eugenehp
eugenehp / angularjs_directive_attribute_explanation.md
Last active August 27, 2015 05:56 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
#!/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...

@eugenehp
eugenehp / osx-setup.md
Last active August 29, 2015 14:02 — forked from suissa/osx-setup.md

Setup Mac OS X

...

1. Run Software Update

Make sure everything is up to date.

Software Update

@eugenehp
eugenehp / Channels.m
Last active August 29, 2015 14:03
Way to filter audio channels
static OSStatus HardwareInputCallbackFunction(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber,
UInt32 inNumberFrames, AudioBufferList *ioData)
{
static UInt64 framesProcessed = 0;
framesProcessed += inNumberFrames;
STSAudioProcessor *processor = (__bridge STSAudioProcessor *)inRefCon;
AudioUnit ioUnit = processor.ioUnit;
@eugenehp
eugenehp / encoder
Created July 22, 2014 00:28
for Max Nelson
import json
class Tree(object):
def __init__(self, name, childTrees=None):
self.name = name
if childTrees is None:
childTrees = []
self.childTrees = childTrees
class MyEncoder(json.JSONEncoder):
@eugenehp
eugenehp / profiler.php
Created July 28, 2014 09:47
wordpress addition to the functions.php
<?php
if ( !defined('SAVEQUERIES') && isset($_GET['debug']) && $_GET['debug'] == 'sql' )
define('SAVEQUERIES', true);
if ( !function_exists('dump') ) :
/**
* dump()
*
* @param mixed $in
* @return mixed $in
**/
@eugenehp
eugenehp / layout.xml
Created August 5, 2014 22:31
Android based layout to have four buttons spread in a table on the bottom of the screen
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="net.attwoodthomas.yourplanner.app.MainActivity">