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
export IFS=$'\n' | |
files=`find . -maxdepth 1 -type f` | |
for f in $files ; do | |
extra_crap=`grep -vh "^Deface" $f | grep -v " *:" | grep -v "^)" | sed '/^$/d'` | |
if [[ "$extra_crap" == "" ]]; then | |
overrides=`tr '\n' ' ' < $f | sed 's/Deface/\nDeface/g'` | |
for o in $overrides ; do | |
new_override=`echo $o | sed 's/\t/ /g;s/ \{1,\}/ /g;s/:\([a-z]\)/\n:\1/g'` | |
echo $new_override | sed 's/:\([a-z]\)/\n:\1/g' > tmp_file |
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
commit 6e4a11335be2f2604c540e3ab5e2655d7392d133 | |
Author: germanc4 <[email protected]> | |
Date: Wed Jul 18 14:46:57 2012 -0700 | |
Adding in stock request, fixes #8 | |
diff --git a/Gemfile b/Gemfile | |
index af25ab4..13ce726 100644 | |
--- a/Gemfile | |
+++ b/Gemfile |
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
o=Spree::Order.find_by_number("R672076841") | |
object=o | |
#'USPS Priority Mail' on my db | |
@carrier=Spree::ShippingMethod.find(16).calculator.carrier | |
if object.is_a?(Array) | |
order = object.first.order | |
elsif object.is_a?(Spree::Shipment) | |
order = object.order |
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
" Vim syntax file | |
" Language: railslog | |
" Maintainer: German Garcia <[email protected]> | |
" Last Change: 5 March 2013 | |
if exists("b:current_syntax") | |
finish | |
endif | |
syn match controller "Processing by.*" |
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/spree/calculator/fedex_mx/base.rb b/app/models/spree/calculator/fedex_mx/base.rb | |
new file mode 100644 | |
index 0000000..cae023a | |
--- /dev/null | |
+++ b/app/models/spree/calculator/fedex_mx/base.rb | |
@@ -0,0 +1,22 @@ | |
+require_dependency 'spree/calculator' | |
+ | |
+module Spree | |
+ class Calculator < ActiveRecord::Base |
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
user = "" | |
pwd = "" | |
url = 'https://yourstore.com/' | |
login_url = "#{url}login.asp" | |
product_url = "#{url}admin/AdminDetails_Generic.asp?table=Products_Joined&ID=" | |
agent = Mechanize.new | |
page = agent.get(login_url) | |
login_form = page.form('loginform') |
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
BROADCAST=255.255.255.255 | |
SUBNET=192.168.1 | |
PORT=80 | |
ACTION=open #opens default browser on a mac | |
for e in $( | |
for i in `ping -c2 $BROADCAST | grep $SUBNET | sed -n "s/.*\($SUBNET.[0-9]\{1,\}\).*/\1/p"` | |
do | |
nc -z $i $PORT | sed -n "s/.*\($SUBNET.[0-9]\{1,\}\).*/\1/p" | |
done) |
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 usps | |
test = "Test='YES'" if Spree::ActiveShipping::Config[:test_mode] | |
xml = [] | |
xml << "<LabelRequest #{test || ''} LabelType='Default' LabelSize='4X6' ImageFormat='PDF'>" | |
xml << "<RequesterID>#{self.usps_req_id}</RequesterID>" | |
xml << "<AccountID>#{self.usps_account}</AccountID>" | |
xml << "<PassPhrase>#{self.usps_password}</PassPhrase>" | |
xml << "<MailClass>#{self.shipping_method}</MailClass>" | |
xml << "<DateAdvance>0</DateAdvance>" | |
xml << "<WeightOz>#{@weight}</WeightOz>" |
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
c.add_job('test') do | |
api = Quickbooks::API[:qb] | |
h = { | |
"customer_add"=> { | |
"name"=>"German", | |
"is_active"=>"true", | |
#"parent_ref"=> { | |
# "list_id"=>"", | |
# "full_name"=>"" | |
#}, |