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
# This is a Rails helper for generating a single chart for a column from a data set. | |
# blood_tests is the data set, and column_name is the column from the set to use. | |
# It calls generate_chart_row for each record, passing the column_name argument. | |
# It also does some stuff with vertical axis labels and chart options. | |
def generateChart(blood_tests, column_name) | |
data_table = GoogleVisualr::DataTable.new |
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 | |
// Public variables -- CONFIGURE ME | |
$dbname = "exampledb"; | |
$dbuser = "exampleuser"; | |
$dbpass = "examplepassword"; | |
// Connect to MySQL using PDO | |
try { | |
$dbh = new PDO('mysql:host=localhost;dbname='.$dbname, $dbuser, $dbpass); | |
} |
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 <SoftwareSerial.h> | |
uint8_t la[8]={0x00,0x7c,0x44,0x44,0x7c,0x44,0x00,0x00}; | |
uint8_t lb[8]={0x00,0x7c,0x44,0x78,0x44,0x7c,0x00,0x00}; | |
uint8_t lc[8]={0x00,0x7c,0x40,0x40,0x40,0x7c,0x00,0x00}; | |
uint8_t ld[8]={0x00,0x78,0x44,0x44,0x44,0x78,0x00,0x00}; | |
uint8_t le[8]={0x00,0x7c,0x40,0x78,0x40,0x7c,0x00,0x00}; | |
uint8_t lf[8]={0x00,0x7c,0x40,0x70,0x40,0x40,0x00,0x00}; | |
uint8_t lg[8]={0x00,0x7c,0x40,0x4c,0x44,0x7c,0x00,0x00}; | |
uint8_t lh[8]={0x00,0x44,0x44,0x7c,0x44,0x44,0x00,0x00}; |
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
#!/usr/bin/python | |
# Get Fees - for accounting for PayPal fees properly in QuickBooks | |
# Originally Written by Jose Diaz for HYPOXIC | |
# Distributed by Will Bradley (will@zyphon.com) under a CC-BY license. | |
# | |
# To use, change the "Pay Pal Account" value towards the bottom of the file | |
# to the name of the Quickbooks account you want PayPal feeds to go into. | |
# | |
# Run this Python script with the filename of the PayPal .iif file to use, | |
# and redirect its output to a file. Example: getfees.py > fees.iif |
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
# TODO: http://gallery.technet.microsoft.com/scriptcenter/Outputs-directory-size-964d07ff | |
http://gallery.technet.microsoft.com/scriptcenter/Delete-files-older-than-x-13b29c09 | |
http://gallery.technet.microsoft.com/scriptcenter/d81d620c-0d1b-4b7a-9c85-13660e929750 | |
http://www.tek-tips.com/viewthread.cfm?qid=1687849 | |
http://www.tek-tips.com/viewthread.cfm?qid=954944 | |
## VBS: | |
On Error Resume Next | |
folderPath = "C:\windows" |
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 | |
// This script pulls two reports from ZenDesk and optionally emails them. | |
// Search for all instances of YOUR_ in this document and replace them. | |
// Uncomment the email-related lines at the bottom to enable sending emails. | |
// Copyright (c) 2012, Will Bradley, will@zyphon.com | |
// All rights reserved. | |
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
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
#!/usr/bin/env ruby | |
#NOTE: Must use Ruby 1.9+ and not 1.8.7. | |
# USAGE: | |
# Run and redirect output to a file for best results. | |
# example: ruby pull-defaults.rb > my-results.yml | |
# For now, you'll have to add the root en: element and increase | |
# the indent level for it to be a valid locale YML. | |
# Uncomment lines 160 and 161 (the ones that call | |
# replace_content_of_file_with_i18n_queries) to have this |
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
Input: ["en.subnets.show. "] | |
Output: {"en"=>{"subnets"=>{"show"=>{" "=>{}}}}} | |
def hashify(strings) | |
strings.map { |s| s.split('.') }.each_with_object({}) do |segmented_string, h| | |
segmented_string.each do |segment| | |
h[segment] ||= {} | |
h = h[segment] | |
end | |
end |
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
<snippet> | |
<content><![CDATA[ | |
<dt><%= ${1:${SELECTION/.*?(:\w*).*/$1/}} %></dt> | |
<dd><%= ${2:${SELECTION/.*?(@\w*).*?:(\w*).*/$1.$2/}} %></dd> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>dt-</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>text.html.ruby</scope> | |
</snippet> |