Skip to content

Instantly share code, notes, and snippets.

@mritzco
mritzco / README.md
Created February 19, 2014 06:03
Angularjs different directives sharing state (revised)

Angularjs different directives sharing state (revised)

Using inheritance for directives to access the parent controller.

Notice that it's also possible to implement this with a parent directive implementing the controller.

This example is similar to other I posted before but removes the use of $parent

See in plunkr

@mritzco
mritzco / README.md
Last active August 29, 2015 13:56
Angular JS. Control screen sections visibility via the app model

Angularjs Control screen sections visibility via the app model

This sample shows how to keep a top level model that states what blocks/ panels to display on the screen.

There are 2 different samples:

  1. Using directives for each panel
  2. Using ng-show

Run the code

http://plnkr.co/edit/d0Dq94?p=preview

@mritzco
mritzco / app.js
Last active January 28, 2017 15:13
AngularJS, setting ng-options for different data sources
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.items = [
{ID: '000001', Title: 'Chicago'},
{ID: '000002', Title: 'New York'},
{ID: '000003', Title: 'Washington'}
];
@mritzco
mritzco / console.css
Created September 17, 2013 08:12
Console.log very simple trick to see your debugging messages on tablets, phones or other devices.
/* Style a layer to display the console.log messages */
#consolediv {
position: absolute;
top:0;
left:0;
bottom:0;
overflow: auto;
font-size: 10px;
color: #333;
width:200px;
@mritzco
mritzco / transmission_on_RPI.md
Last active April 26, 2019 06:23
Setting up transmission on your Raspberry PI on RaspBMC

Step by step guide to setting up transmission on your RPI

Notes

  • Use a card at least 8gigs
  • Format the card to ext4
  • Follow instructions on site

You can enter this commands from the Raspberry itself or connect using SSH

Most RPI information taken from: