This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ -z "$2" ]; then | |
echo “Usage: $0 domain_name ip[:port]“ | |
exit | |
fi | |
#create cert | |
./create_cert $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ -z "$1" ]; then | |
echo "Usage: $0 domain_name" | |
exit | |
fi | |
openssl req -new -newkey rsa:2048 -nodes -out $1.csr -keyout $1.key -subj "/C=DK/ST=Copenhagen/L=Noerrebro/O=my_company/CN=$1" | |
openssl x509 -req -days 365 -in $1.csr -signkey $1.key -out $1.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddDeviseColumnsToUser < ActiveRecord::Migration | |
def self.up | |
change_table :users do |t| | |
#if you already have a email column comment the below line | |
t.database_authenticatable | |
t.confirmable | |
t.recoverable | |
t.rememberable | |
t.trackable | |
t.string :encrypted_password, :limit => 128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
route: | |
resources :muscle_groups do | |
resources :muscles | |
end | |
controller index method: | |
def index | |
if params[:muscle_group_id] | |
muscle_group_id = params[:muscle_group_id] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DevicesController < ApplicationController | |
before_filter :authenticate_user!, :only => [:new, :create, :edit, :update, :destroy] | |
def update_registration_id | |
@device = Device.find_by_device_id(params[:device_id]) | |
@device.registration_id = params[:registration_id] | |
@device.save | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.snot.bloatware; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentActivity; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.view.ViewPager; | |
import android.util.Log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
if [ $# -eq 0 ] ; then | |
echo "Usage: $0 ICON_FILE PROJECT_DIR" | |
exit 0 | |
fi | |
ICON="$1" | |
PROJECT="$2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity android:name=".GroupPickerActivity"> | |
<intent-filter> | |
<action android:name="android.intent.action.PICK" /> | |
<data android:scheme="content" android:mimeType="com.android.contacts/groups" /> | |
</intent-filter> | |
</activity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.snot.findawatertap; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.view.ViewPager; | |
import android.support.v4.app.FragmentTransaction; | |
import android.support.v7.app.ActionBarActivity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.snot.findawatertap; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.view.ViewPager; | |
import android.support.v4.app.FragmentTransaction; | |
import android.support.v7.app.ActionBarActivity; |
OlderNewer