Skip to content

Instantly share code, notes, and snippets.

View hendrikbeck's full-sized avatar

Hendrik Beck hendrikbeck

View GitHub Profile
# Update Homebrew
brew update
brew doctor
# RUBY: brauchen 2.3.1
ruby -v
brew install gpg
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -L get.rvm.io | bash -s stable
@hendrikbeck
hendrikbeck / dark_launch.rb
Last active August 29, 2015 14:09
DIY feature toggle to soft launch and dark launch features in Rails, based on Heroku config vars
class DarkLaunch
def self.feature_visible(feature_id, current_user)
if !current_user
# Only logged in users should have access to Dark Launch features
return false
end
if Rails.env.development? || Rails.env.test?
@hendrikbeck
hendrikbeck / Command line steps
Created August 16, 2014 09:57
Rails SSL for local development
# I found 2 cool links that do most of the work. I just added a few lines that I needed to do on my machine to make it work
# From http://makandracards.com/makandra/15901-howto-create-a-self-signed-certificate
openssl req -new -newkey rsa:2048 -sha1 -days 365 -nodes -x509 -keyout server.key -out server.crt
mkdir /Users/NAME/.ssl
cp server.key /Users/NAME/.ssl
cp server.crt /Users/NAME/.ssl
# From http://makandracards.com/makandra/15903-using-thin-for-development-with-ssl
@hendrikbeck
hendrikbeck / murmio_javascript_sdk_advanced
Last active August 29, 2015 14:03
Advanced parameters for the Javascript SDK
$('#murm').murm(MY_AUTHENTICATION_KEY,
{
tag: "My first example",
user: "My user, e.g. an ID that helps you to see who it was",
email: "The email of your customer",
transaction: "A transcation ID, e.g. an order ID",
object: "Some object reference, e.g. to a product or a helpdesk article (if that applies)"
}
@hendrikbeck
hendrikbeck / murmio_javascript_sdk_basic
Last active August 29, 2015 14:03
Murmio Javascript SDK
<div id="murm"></div>
<script src="https://preview.murm.io/sdk/murmio.js"></script>
<script>
$('#murm').murm(MY_AUTHENTICATION_KEY,
{
tag: "My first example"
}
);
</script>
@hendrikbeck
hendrikbeck / android_sdk_global_settings
Created July 7, 2014 19:30
Configure global settings through the MurmConfig class
MurmConfig.setUserId(SessionManager.getLoggedInUser().getUserId());
@hendrikbeck
hendrikbeck / android_sdk_configure_murm
Created July 7, 2014 19:28
Configure Murms programmatically
Murm m = (Murm) findViewById(R.id.my_first_murm);
m.setUserId("John Doe");
m.setTransactionId("123456");
@hendrikbeck
hendrikbeck / android_sdk_layout_element
Last active August 29, 2015 14:03
Murm.io view element in layout file
<io.murmio.android.sdk.Murm
android:id="@+id/my_first_murm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
murm.io:tag="My first example" />
@hendrikbeck
hendrikbeck / android_sdk_layout_namespace
Created July 7, 2014 19:20
Murm.io namespace in layout files
xmlns:murm.io="http://schemas.android.com/apk/res-auto"
@hendrikbeck
hendrikbeck / android_sdk_gradle
Last active August 29, 2015 14:03
Murmio Gradle dependencies for the Android SDK
repositories {
maven { url 'https://raw.githubusercontent.com/hendrikbeck/mvn_repo/master/' }
}
dependencies {
// Your other dependencies go here...
compile 'io.murm.android:sdk:0.0.5+@aar'
}