This file contains hidden or 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
function ps1_powerline { | |
RETCODE=$? # save return code | |
NUM_JOBS=$(jobs -rp | wc -l) | |
GIT_BRANCH=$(__git_ps1) | |
RUBY=$(prompt_rvm) | |
# local GREY="\[\e[48;5;240m\]\[\e[38;5;250m\]" | |
# local GREY_END="\[\e[48;5;2m\]\[\e[38;5;240m\]" | |
local GREEN="\[\e[48;5;2m\]\[\e[38;5;255m\]" |
This file contains hidden or 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 PdfController < ActionController::Base | |
include PdfGeneration | |
expose :report | |
def self.draw_report(draw) | |
run { build_draw_report(draw) } | |
end | |
def self.portfolio_report(portfolio) |
This file contains hidden or 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 PdfController < ActionController::Base | |
include PdfGeneration | |
expose :report | |
def self.draw_report(draw) | |
run { build_draw_report(draw) } | |
end | |
def self.portfolio_report(portfolio) |
This file contains hidden or 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
module PdfGeneration | |
def pdf_options(report) | |
{ | |
pdf: "report", | |
layout: "report_pdf", | |
template: "reports/show", | |
orientation: "Landscape", | |
page_size: "Letter", | |
print_media_type: true, |
This file contains hidden or 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
%h5 INVOICE REGISTER | |
%table.report.unlined(style="font-size: 7pt; margin-bottom: 0") | |
%thead | |
%tr.bb-1(style="page-break-inside: avoid;") | |
%th.text-center(style="width:2% !important") No. | |
%th.text-center(style="width:18% !important") Vendor | |
%th.text-center(style="width:15% !important") Invoice Number | |
%th.text-center(style="width:13% !important") Invoice Date | |
%th.text-center(style="width:12% !important") Payment Status |
This file contains hidden or 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
%h5 PORTFOLIO COST REPORT | |
%table.report | |
%thead.print | |
.nobreak | |
%tr | |
%th(colspan=2 style="text-align: left; width:16% !important") Project Name | |
%th | |
Baseline Budget | |
%th |
This file contains hidden or 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
/* global $ */ | |
'use strict' | |
import React, {Component} from 'react' | |
import {connect} from 'react-redux' | |
import ReactDOM from 'react-dom' | |
import {findDOMNode} from 'react-dom' | |
import {Modal, ModalHeader, ModalBody, ModalFooter, Collapse, Button, FormGroup, FormText, Label, Input} from 'reactstrap' | |
import {assign} from 'lodash' |
This file contains hidden or 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
<script src="https://checkout.stripe.com/checkout.js"></script> | |
<a id="customButton" class="btn btn-lg btn-success mb-4">Donate</a> | |
<script defer="defer"> | |
$(function() { | |
$('#new_donation').parsley(); | |
$('#donation_amount').on('keypress', function() { | |
$(this).parsley().removeError("min", {updateClass: true}); |
This file contains hidden or 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
charge = Stripe::Charge.create( | |
{ | |
source: donation.stripeToken, | |
amount: donation.amount_cents, | |
description: 'Piggybackr v2', | |
currency: donation.amount_currency, | |
statement_descriptor: statement_descriptor, | |
destination: { | |
amount: donation.amount_cents - donation.site_fee_cents, | |
account: fundraiser.owner.stripe_user_id |
This file contains hidden or 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 Foo(object): | |
def method(param): | |
class Bar(object): | |
def method(param): | |
Foo().method(param) |
NewerOlder