Skip to content

Instantly share code, notes, and snippets.

@MichaelCPell
MichaelCPell / app.component.spec.ts
Created May 24, 2017 16:18
App Component Spec for Medium
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
{
"data": {
"places": [{
"geometry": {
"location": {
"lat": 35.92041999999999,
"lng": -78.8104
},
"viewport": {
"northeast": {
@MichaelCPell
MichaelCPell / system.config.js
Created October 11, 2016 17:01
new systemjs config for sample app
/**
* System configuration for Angular samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
@MichaelCPell
MichaelCPell / system.config.js
Created October 11, 2016 16:55
system.js config for sample app
/**
* System configuration for Angular samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
@MichaelCPell
MichaelCPell / variables.json
Created September 30, 2016 17:08 — forked from chadhuber/variables.json
ACSVariableDictionary.json
This file has been truncated, but you can view the full file.
{
"variables": {
"for": {
"label": "Census API FIPS 'for' clause",
"concept": "Census API Geography Specification",
"predicateType": "fips-for",
"predicateOnly": true
},
"in": {
"label": "Census API FIPS 'in' clause",
var addMarker;
$(document).ready(function(){
var mymap = L.map('mapid').setView([35.7796, -78.6382], 13);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpandmbXliNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw', {
maxZoom: 18,
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
if @order_item = @order.order_items.where(product_id: params[:product_id])
@order_item.quantity = @order_item.quantity + 1
@order_item.save
else
# Whatever
end
var renderers = [];
GoogleMapsApi.displayRoute = function(origin, place, map){
options = {
preserveViewport: true,
markerOptions: {
strokeColor: "black"
}
};
before_save do
if wiki.private == true
unless wiki.user.premium?
wiki.errors.add(:private, "Must be premium to make private wikis")
end
end
end
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.