View shipping.diff
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
diff --git a/app/models/shipping/commodity.rb b/app/models/shipping/commodity.rb | |
index ae7b51bc..1cdcf3f7 100644 | |
--- a/app/models/shipping/commodity.rb | |
+++ b/app/models/shipping/commodity.rb | |
@@ -2,10 +2,13 @@ module Shipping | |
class Commodity < ApplicationRecord | |
belongs_to :shipments | |
+ monetize :sales_unit_price_cents | |
+ monetize :total_price_cents |
View shipping.diff
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
diff --git a/app/models/shipping/commodity.rb b/app/models/shipping/commodity.rb | |
index ae7b51bc..1cdcf3f7 100644 | |
--- a/app/models/shipping/commodity.rb | |
+++ b/app/models/shipping/commodity.rb | |
@@ -2,10 +2,13 @@ module Shipping | |
class Commodity < ApplicationRecord | |
belongs_to :shipments | |
+ monetize :sales_unit_price_cents | |
+ monetize :total_price_cents |
View app.js
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
helpButton.on("click", event => { | |
chan.push("help_needed", {}) | |
}) |
View application.clj
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
(ns layouts.application | |
(:require [hiccup.page :as h] | |
[hourglass.helpers :as misc])) | |
(defn layout [page] | |
(h/html5 | |
misc/pretty-head | |
(misc/pretty-body page))) | |
(defn home [] |
View controller.rb
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
def track_event_on_mixpanel | |
Resque.enqueue MixpanelTrackEventJob, "Event", properties, env | |
end |
View gist:5473656
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 UserMailer { | |
private $user; | |
public function __construct($user) | |
{ | |
$this->user = $user; | |
} | |
public function activation_deliver() | |
{ |
View gist:5473447
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
<?php | |
class UserMailer { | |
private $user = null; | |
public function __construct(user) | |
{ | |
$this->$user = user; | |
} | |
View age.c
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
#include <stdio.h> | |
void print_ages(int age) { | |
int i; | |
int number_of_trips = 0; | |
for (i = 0; i <= age; i++) | |
{ | |
if(i % 8 == 0 && i % 5 != 0) { | |
printf("%i\n", i); | |
number_of_trips++; |
View gist:4124148
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
url="https://exportwriter.zoho.com/remotedoc.im?apikey=#{apikey}&output=url" | |
uri = URI.parse(url) | |
req = Net::HTTP::Post.new(uri.path) | |
req.set_form_data(params) | |
http = Net::HTTP.new(uri.host, uri.port) | |
http.use_ssl = true | |
response = http.request(req) |
View after.rb
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 UserTeamsController < ApplicationController | |
respond_to :html | |
def create | |
if is_a_coach? | |
create_a_team_for_the_coach | |
populate_flash condition: @coach_to_team_connection, | |
success_msg: t('flash.team.created.success'), | |
failure_msg: t('flash.team.created.error') |
NewerOlder