Skip to content

Instantly share code, notes, and snippets.

View Phtes's full-sized avatar

Kasey Klein Phtes

  • Southern California
View GitHub Profile
$customerModel = Mage::getModel('customer/customer');
$addressModel = Mage::getModel('customer/address');
foreach ($customerIdList as $customerId) {
$customer = NULL;
$customer = $customerModel->load($customerId);
$billing = $addressModel->load($customer->getDefaultBilling());
Mage::log($billing);
}
deleteme:
cloud.present:
- cloud_provider: do
- image: ubuntu-14-04-x64
- size: 512MB
- name: testcomputer
- location: nyc3
- grains:
roles:
- rproxy
EXECUTE sp_rename @objname = N'dbo.AspNetRoles', @newname = N'IdentityRoles', @objtype = N'OBJECT'
IF object_id('[PK_dbo.AspNetRoles]') IS NOT NULL BEGIN
EXECUTE sp_rename @objname = N'[PK_dbo.AspNetRoles]', @newname = N'PK_dbo.IdentityRoles', @objtype = N'OBJECT'
END
Caution: Changing any part of an object name could break scripts and stored procedures.
Caution: Changing any part of an object name could break scripts and stored procedures.
EXECUTE sp_rename @objname = N'dbo.AspNetUserRoles', @newname = N'IdentityUserRoles', @objtype = N'OBJECT'
IF object_id('[PK_dbo.AspNetUserRoles]') IS NOT NULL BEGIN
EXECUTE sp_rename @objname = N'[PK_dbo.AspNetUserRoles]', @newname = N'PK_dbo.IdentityUserRoles', @objtype = N'OBJECT'
END
modelBuilder.Entity<IdentityUserLogin>().HasKey<string>(l => l.UserId);
modelBuilder.Entity<IdentityRole>().HasKey<string>(r => r.Id);
modelBuilder.Entity<IdentityUserRole>().HasKey(r => new { r.RoleId, r.UserId });
app.factory('authInterceptor', function($q, Auth) {
return {
request: function (config, req) {
if (req.url.indexOf('/myauthurl') !== -1) {
var deferred = $q.defer();
if (Auth.authz.token) {
console.log("entro")
Auth.authz.updateToken(5).success(function() {
config.headers = config.headers || {};
[Table("Answers")]
public class Answer
{
[Key,Column(Order = 0)]
public int AnswerId { get; set; }
[Key, Column(Order = 1)]
public virtual Question Question { get; set; }
public virtual Project Project { get; set; }
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using System.Data.Entity.Infrastructure;
using System.ComponentModel.DataAnnotations;
namespace EDGWebApi.Models
{
//Initial Migration
public class Product
{
public int Id { get; set; }
public int UserId { get; set; }
}
//Updated Model
public class Product