Skip to content

Instantly share code, notes, and snippets.

View hendrikbeck's full-sized avatar

Hendrik Beck hendrikbeck

View GitHub Profile
@hendrikbeck
hendrikbeck / circle.yml
Created September 14, 2013 10:27
Rails configuration to test and deploy to Heroku via CircleCI
database:
override:
- mkdir -p config
- |
echo 'test:
host: localhost
username: ubuntu
database: circle_ruby_test
adapter: postgresql
' > config/database.yml
@hendrikbeck
hendrikbeck / <environment>.rb
Created September 30, 2013 05:29
Email Configuration for Amazon SES in Ruby on Rails
ActionMailer::Base.smtp_settings = {
:address => 'email-smtp.us-east-1.amazonaws.com',
:port => 25,
:authentication => 'login',
# The following 2 of course shouldn't be in here. When you open SES on the AWS Mangaement Console, they
# provide a link to create STMP users within Amazon. Just follow that and you'll get username and password.
:user_name => ENV['EMAIL_USERNAME'],
:password => ENV['EMAIL_PASSWORD'],
:domain => 'mysquar.com',
:enable_starttls_auto => true
@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'
}
@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_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_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_global_settings
Created July 7, 2014 19:30
Configure global settings through the MurmConfig class
MurmConfig.setUserId(SessionManager.getLoggedInUser().getUserId());
@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 / 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 / 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