Demo of my blog post: http://chrisgarvis.com/blog/screw-d3-js-bar-charts-in-angularjs.html
You can view at: http://bl.ocks.org/cgarvis/7794012
defmodule Website do | |
alias NimbleCSV.RFC4180, as: CSV | |
def fetch_data(url) do | |
with {:ok, resp} <- HTTPoison.get(report.url, [timeout: 50_000]), | |
{:ok, files} <- :zip.extract(resp.body), | |
{_name, content} <- hd(files), | |
rows <- CSV.parse_string(content) | |
do | |
{:ok, rows} |
SAM_PACKAGE_TEMPLATE = ./aws-sam/build/template.yaml | |
SAM_TEMPLATE = ./template.yaml | |
SAM_INFRA_DEPENDENCIES := $(shell find infra -type f) | |
.PHONY: $(SAM_INFRA_DEPENDENCIES) | |
$(SAM_INFRA_DEPENDENCIES): | |
cfn-lint $@ | |
.PHONY:lint | |
lint: ## Lint cloudformation template |
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
#import "AppDelegate.h" |
var React = require('react'); | |
var List = require('./list.js'); | |
function registerBehavior(reactClass, selector) { | |
var mountingNodes = document.querySelectorAll(selector); | |
for(var i = 0; i< mountingNodes.length; i++) { | |
React.render(React.createElement(reactClass), mountingNodes[i]); | |
} | |
} |
require 'base64' | |
require 'net/http' | |
class ImageProxyController < ActionController::Base | |
def get | |
url = URI.parse(Base64.decode64(params[:url])) | |
image = Net::HTTP.get_response(url) | |
send_data image.body, type: image.content_type, disposition: 'inline' | |
end | |
end |
package main | |
import( | |
"net/http" | |
"testing" | |
. "github.com/smartystreets/goconvey/convey" | |
) | |
type ResponseTester struct { | |
response *http.Response |
Demo of my blog post: http://chrisgarvis.com/blog/screw-d3-js-bar-charts-in-angularjs.html
You can view at: http://bl.ocks.org/cgarvis/7794012
'use strict' | |
angular.module('app') | |
.directive 'onEnter', () -> | |
(scope, element, attrs) -> | |
element.bind "keydown keypress", (event) -> | |
if event.which is 13 | |
scope.$apply () -> | |
scope.$eval(attrs.onEnter) | |
event.preventDefault() |
module HexagonalGem | |
class CreateCustomer | |
attr_reader :listener, :validator | |
def self.create customer, listener = {} | |
c = CreateCustomer.new(listener) | |
c.create(customer) | |
end | |
def initialize(listener) |
# ------------------------------------------------------------------------ | |
# Christopher Garvis | |
# oh-my-zsh theme | |
# Totally ripped-off Tyler Cipriani | |
# ------------------------------------------------------------------------ | |
# Grab the current date (%W) and time (%t): | |
#bold MOVELINE_TIME_="%{$fg_bold[red]%}#%{$fg_bold[white]%}( %{$fg_bold[yellow]%}%W%{$reset_color%}@%{$fg_bold[white]%}%t )( %{$reset_color%}" | |
MOVELINE_TIME_="%{$fg[red]%}#%{$fg_bold[white]%}( %{$fg[yellow]%}%W%{$reset_color%}@%{$fg_bold[white]%}%t )( %{$reset_color%}" |