Difference between revisions of "Adafruit Order"

From ATXHackerspace

Jump to: navigation, search
(Mar Adafruit Order)
(put phweat's items in the proper table, restore Shadow's item to Feb table. Feb table scheduled for deletion when order is placed.)
Line 18: Line 18:
 
! scope="col" | MEMBER
 
! scope="col" | MEMBER
 
|-
 
|-
| 170
+
| 362
| [http://www.adafruit.com/products/170 Adafruit ARDX - v1.3 Experimentation Kit for Arduino (Uno R3) - v1.3]  
+
| [http://www.adafruit.com/products/362 MiFare Classic (13.56MHz RFID/NFC) Sticker - 1KB ]
| 1  
+
| 4
| $85.00  
+
| $2.50
 +
|  ??
 +
| ~$10.00
 +
| pwheat
 +
|-
 +
| 436
 +
| [http://www.adafruit.com/products/364 PN532 NFC/RFID controller breakout board - v1.3 ]  
 +
| 1
 +
| $50.00
 +
|  ??
 +
| ~$50.00  
 +
| pwheat
 +
|-
 +
| 436
 +
| [https://www.adafruit.com/products/436 Sugru Multicolor pack]
 +
| 1
 +
| $17.95
 
|  ??  
 
|  ??  
| ~$85.00
+
| ~$17.95
| Shadow
+
| pwheat
 
|}
 
|}
 +
 +
 +
<br>
 +
<div style="display:none" class="explanation README">
 +
  You don't have to mess with the progress bar, it's a PITA to do manually, and Roland will likely do it himself when he's bored.  But if you WANT to:
 +
  Change the width of the inner div to some # of pixels out of 500.  Formulas:  newWidth = currentTotal / $250 * 500px;  percent = round(currentTotal / $250 * 100)
 +
</div>
 +
 +
<div style="width: 500px; text-align: center; border: 1px solid black;margin: 0 auto;background-image: -moz-linear-gradient(#ddd, #fff);background-image: -webkit-linear-gradient(#ddd, #fff);"><div class="CHANGE_WIDTH_HERE" style="width: 156px;background-color: green; color: white; font-weight: bold;background-image: -moz-linear-gradient(#5b5, #272);background-image: -webkit-linear-gradient(#5b5, #272);">31% of $250 goal</div></div>
 +
 +
== Adding it up ==
 +
Mostly you can add it up your total in your head or with a calculator just as quickly as copy/pasting this, but you can also use some tools to help.
 +
=== Copy/paste + awk ===
 +
Copy/paste the table from your web browser into a text file.  You should get tab delimited output (tested using Google Chrome pasting into vim).  Save the text file as "order.tsv" and run:
 +
  awk -F"\t" '/YOURNAMEHERE/ {print $6}' order.tsv | tr -d '~$ '| awk '{sum+=$1}END{print sum}'
 +
 +
=== screen scraping with lynx and grep ===
 +
This avoids the copy/paste, but requires that your name not appear on any other lines in this page.
 +
<pre><nowiki>
 +
  lynx -width=500 -dump "http://www.atxhackerspace.org/index.php?title=Adafruit_Order" | egrep -o "[0-9\.]*[0-9]*[ ]+YOURNAMEHERE" | awk '{sum+=$1}END{print sum}'
 +
</nowiki></pre>
 +
 +
Here's one for elinks, which uses a vertical pipe and variable whitespace when rendering table cells:
 +
 +
<pre><nowiki>
 +
  elinks --dump-width 500 -dump "http://www.atxhackerspace.org/index.php?title=Adafruit_Order" | egrep -o "[0-9\.]*[0-9]*[ ]+\|[ ]*YOURNAMEHERE" | awk '{sum+=$1}END{print sum}'
 +
</nowiki></pre>
 +
 +
=== Built-in browser javascript console sniffing via DOM ===
 +
You can open a javsacript console in Google Chrome or Firefox with Firebug installed by pressing the F12 key.  Then paste in:
 +
 +
<pre><nowiki>
 +
  var NAME_REGEXP=/YOURNAMEHERE/;var t = document.getElementById("orderTable");var sum=0;for( var i =0; i < t.rows.length ; ++i){var r = t.rows[i]; if( NAME_REGEXP.test(r.cells[6].textContent) ) { sum+= parseFloat( r.cells[5].textContent.replace(/[^\d\.]/g,'' ), 10); } };console.log( NAME_REGEXP.source + " owes: $" + sum );
 +
</nowiki></pre>
 +
 +
Floating point rounding errors can happen due to IEEE 754 float representation in javscript.  You'd have to convert dollars to cents to fix.
 +
  
 
== Feb Adafruit Order '''IS CLOSED'''==
 
== Feb Adafruit Order '''IS CLOSED'''==
  
{| border="2" align="center" id="orderTable"
+
{| border="2" align="center" id="FEB_orderTable"
 
|-
 
|-
 
! scope="col" | ITEM#  
 
! scope="col" | ITEM#  
Line 143: Line 196:
 
| MElbert
 
| MElbert
 
|-
 
|-
| 362
+
| 170
| [http://www.adafruit.com/products/362 MiFare Classic (13.56MHz RFID/NFC) Sticker - 1KB ]  
+
| [http://www.adafruit.com/products/170 Adafruit ARDX - v1.3 Experimentation Kit for Arduino (Uno R3) - v1.3]  
| 4
+
| 1
| $2.50
+
| $85.00
 
| &nbsp;??  
 
| &nbsp;??  
| ~$10.00  
+
| ~$85.00  
| pwheat
+
| Shadow
|-
 
| 436
 
| [http://www.adafruit.com/products/364 PN532 NFC/RFID controller breakout board - v1.3 ]
 
| 1
 
| $50.00
 
| &nbsp;??
 
| ~$50.00
 
| pwheat
 
|-
 
| 436
 
| [https://www.adafruit.com/products/436 Sugru Multicolor pack]
 
| 1
 
| $17.95
 
| &nbsp;??
 
| ~$17.95
 
| pwheat
 
 
|}
 
|}
 
+
<div style="display:none"> ABOVE IS FEB table -- that order is CLOSED</div>
<br>
 
<div style="display:none" class="explanation README">
 
  You don't have to mess with the progress bar, it's a PITA to do manually, and Roland will likely do it himself when he's bored.  But if you WANT to:
 
  Change the width of the inner div to some # of pixels out of 500.  Formulas:  newWidth = currentTotal / $250 * 500px;  percent = round(currentTotal / $250 * 100)
 
</div>
 
 
 
<div style="width: 500px; text-align: center; border: 1px solid black;margin: 0 auto;background-image: -moz-linear-gradient(#ddd, #fff);background-image: -webkit-linear-gradient(#ddd, #fff);"><div class="CHANGE_WIDTH_HERE" style="width: 511px;background-color: green; color: white; font-weight: bold;background-image: -moz-linear-gradient(#5b5, #272);background-image: -webkit-linear-gradient(#5b5, #272);">~102% of $250 goal</div></div>
 
 
 
== Adding it up ==
 
Mostly you can add it up your total in your head or with a calculator just as quickly as copy/pasting this, but you can also use some tools to help.
 
=== Copy/paste + awk ===
 
Copy/paste the table from your web browser into a text file.  You should get tab delimited output (tested using Google Chrome pasting into vim).  Save the text file as "order.tsv" and run:
 
  awk -F"\t" '/YOURNAMEHERE/ {print $6}' order.tsv | tr -d '~$ '| awk '{sum+=$1}END{print sum}'
 
 
 
=== screen scraping with lynx and grep ===
 
This avoids the copy/paste, but requires that your name not appear on any other lines in this page.
 
<pre><nowiki>
 
  lynx -width=500 -dump "http://www.atxhackerspace.org/index.php?title=Adafruit_Order" | egrep -o "[0-9\.]*[0-9]*[ ]+YOURNAMEHERE" | awk '{sum+=$1}END{print sum}'
 
</nowiki></pre>
 
 
 
Here's one for elinks, which uses a vertical pipe and variable whitespace when rendering table cells:
 
 
 
<pre><nowiki>
 
  elinks --dump-width 500 -dump "http://www.atxhackerspace.org/index.php?title=Adafruit_Order" | egrep -o "[0-9\.]*[0-9]*[ ]+\|[ ]*YOURNAMEHERE" | awk '{sum+=$1}END{print sum}'
 
</nowiki></pre>
 
 
 
=== Built-in browser javascript console sniffing via DOM ===
 
You can open a javsacript console in Google Chrome or Firefox with Firebug installed by pressing the F12 key.  Then paste in:
 
 
 
<pre><nowiki>
 
  var NAME_REGEXP=/YOURNAMEHERE/;var t = document.getElementById("orderTable");var sum=0;for( var i =0; i < t.rows.length ; ++i){var r = t.rows[i]; if( NAME_REGEXP.test(r.cells[6].textContent) ) { sum+= parseFloat( r.cells[5].textContent.replace(/[^\d\.]/g,'' ), 10); } };console.log( NAME_REGEXP.source + " owes: $" + sum );
 
</nowiki></pre>
 
 
 
Floating point rounding errors can happen due to IEEE 754 float representation in javscript.  You'd have to convert dollars to cents to fix.
 

Revision as of 22:39, 10 February 2012

Adafruit Wholesale Order

We get various discounts from Adafruit if we order $250 worth of stuff. It's the Adafruit wholesale discount! So, if you want to get in on an order, add your request to this page. When the total gets to be ~$250, the order goes in, and is delivered to the hackerspace.

There have been various non-paying people on the last couple orders. SO, in order to put the order in this time, when the order is complete we'll be taking the payments BEFORE placing the order. Sorry, but the hackerspace just can't absorb $70-100 in unpaid items.

Mar Adafruit Order

ITEM# DESCRIPTION QTY COST DISCOUNT_COST TOTAL MEMBER
362 MiFare Classic (13.56MHz RFID/NFC) Sticker - 1KB 4 $2.50  ?? ~$10.00 pwheat
436 PN532 NFC/RFID controller breakout board - v1.3 1 $50.00  ?? ~$50.00 pwheat
436 Sugru Multicolor pack 1 $17.95  ?? ~$17.95 pwheat



31% of $250 goal

Adding it up

Mostly you can add it up your total in your head or with a calculator just as quickly as copy/pasting this, but you can also use some tools to help.

Copy/paste + awk

Copy/paste the table from your web browser into a text file. You should get tab delimited output (tested using Google Chrome pasting into vim). Save the text file as "order.tsv" and run:

 awk -F"\t" '/YOURNAMEHERE/ {print $6}' order.tsv | tr -d '~$ '| awk '{sum+=$1}END{print sum}'

screen scraping with lynx and grep

This avoids the copy/paste, but requires that your name not appear on any other lines in this page.

  lynx -width=500 -dump "http://www.atxhackerspace.org/index.php?title=Adafruit_Order" | egrep -o "[0-9\.]*[0-9]*[ ]+YOURNAMEHERE" | awk '{sum+=$1}END{print sum}'

Here's one for elinks, which uses a vertical pipe and variable whitespace when rendering table cells:

  elinks --dump-width 500 -dump "http://www.atxhackerspace.org/index.php?title=Adafruit_Order" | egrep -o "[0-9\.]*[0-9]*[ ]+\|[ ]*YOURNAMEHERE" | awk '{sum+=$1}END{print sum}'

Built-in browser javascript console sniffing via DOM

You can open a javsacript console in Google Chrome or Firefox with Firebug installed by pressing the F12 key. Then paste in:

  var NAME_REGEXP=/YOURNAMEHERE/;var t = document.getElementById("orderTable");var sum=0;for( var i =0; i < t.rows.length ; ++i){var r = t.rows[i]; if( NAME_REGEXP.test(r.cells[6].textContent) ) { sum+= parseFloat( r.cells[5].textContent.replace(/[^\d\.]/g,'' ), 10); } };console.log( NAME_REGEXP.source + " owes: $" + sum );

Floating point rounding errors can happen due to IEEE 754 float representation in javscript. You'd have to convert dollars to cents to fix.


Feb Adafruit Order IS CLOSED

ITEM# DESCRIPTION QTY COST DISCOUNT_COST TOTAL MEMBER
165 Temp Sensor 6 $2.00 $1.60 $9.60 Martin
98 GPS Logger Shield 1 $19.50 $19.50 $19.50 Martin
377 Rotary Encoder + Extras - 2 $4.50  ? ~$9 Roland M.
501 5V 1A (1000mA) USB port power supply 2 $4.95  ? ~$9.90 Roland M.
268 Powerswitch Tail 2 1 $24.95  ? ~$24.95 Roland M.
412 Small push-pull solenoid 1 $9.95  ? ~$9.95 Roland M.
571 Adafruit Perma-Proto Half-sized Breadboard PCB - 3 Pack! 1 $9.95  ? ~$9.95 Roland M.
678 RF Touch Wheel Controller for Analog RGB LED Strips 1 $39.95  ? ~$39.95 Roland M.
677 Terminal block - 4 pin Euro-Style 1 $2.50  ? ~$2.50 Roland M.
579 4-pin JST SM Receptacle Cable 4 $1.50  ? ~$6.00 Roland M.
578 4-pin JST SM Plug Cable 4 $1.50  ? ~$6.00 Roland M.
675 Sewable Electroluminscent (EL) Wire Welted Piping- Aqua 5 meters 1 $19.95  ? ~$19.95 MElbert
345 Nunchucky 1 $3.00  ? ~$3.00 MElbert
170 Adafruit ARDX - v1.3 Experimentation Kit for Arduino (Uno R3) - v1.3 1 $85.00  ?? ~$85.00 Shadow
ABOVE IS FEB table -- that order is CLOSED