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
aNfjYFoYFFXHAv6LHh4vYNVrP |
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
# -*- coding: utf-8 -*- | |
require 'fileutils' | |
# expects #{Rails.root}/doc/apidoc/schema_apipie.json and #{Rails.root}/doc/apidoc/schema_swagger_json.json | |
# produces: #{Rails.root}/doc/apidoc/schema_swagger_json_nested.json | |
# add in your lib/tasks folder and run with | |
# rake apphub:openapi2 | |
namespace :apphub do |
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
# Welcome to Sonic Pi v3.1 | |
# A german children song and the very first thing any german child attempts when learning to play the piano | |
use_bpm 180 | |
[ :c, :d, :e, :f, :g ].each do |key| | |
play key | |
sleep 1 | |
end |
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
In May 2013 we installed 12 Solar Panels on the roof; 6 north facing, 6 east facing. Because we have lots of trees providing shade which affects the ability of solar panels to generate power we went with Micro Inverters, so for every 2 panels there is a separate inverter converting the sunshine into amps. I had a look at our last power bill and the effect of the solar is clearly visible - while the off peak consumption is almost unchanged from a year ago (because let's face it - not much sun happening between 11:30pm and 6am), the peak consumption is halved, which not only reduces the need for more greenhouse emissions from power plants, but also saved us over $250. On top of that we also got a credit of $260 for solar contributions we made (where we produced more electricity via Solar than we actually needed). Total savings of over $500 for a quarter. Even assuming that in Winter the solar output is quite a bit less, it should only take about 4 years to get the investment in the solar equipment back. I'm not |
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
// with animation: | |
NSURLRequest *ur = [NSURLRequest requestWithURL:imageURL]; | |
// to fade the image in automatically when it's loaded: | |
// http://stackoverflow.com/questions/13974226/afnetworking-fade-animation-on-image-while-scrolling-uitableview | |
[cell.imageView setImageWithURLRequest:ur placeholderImage:[UIImage imageNamed:@"placeholder.png"] success:^(NSURLRequest *request , NSHTTPURLResponse *response , UIImage *image ){ | |
if (request) { | |
//Fade animation |
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
// array with international direct dialling prefixes to populate table view | |
NSArray *idd_list = [NSArray arrayWithObjects:@"Afghanistan (+93)",@"Albania (+355)",@"Algeria (+213)",@"American Samoa (+1 684)",@"Andorra (+376)",@"Angola (+244)",@"Anguilla (+1 264)",@"Antarctica (+672)",@"Antigua and Barbuda (+1 268)",@"Argentina (+54)",@"Armenia (+374)",@"Aruba (+297)",@"Australia (+61)",@"Austria (+43)",@"Azerbaijan (+994)",@"Bahamas (+1 242)",@"Bahrain (+973)",@"Bangladesh (+880)",@"Barbados (+1 246)",@"Belarus (+375)",@"Belgium (+32)",@"Belize (+501)",@"Benin (+229)",@"Bermuda (+1 441)",@"Bhutan (+975)",@"Bolivia (+591)",@"Bosnia and Herzegovina (+387)",@"Botswana (+267)",@"Brazil (+55)",@"British Indian Ocean Territory (+)",@"British Virgin Islands (+1 284)",@"Brunei (+673)",@"Bulgaria (+359)",@"Burkina Faso (+226)",@"Burma (Myanmar) (+95)",@"Burundi (+257)",@"Cambodia (+855)",@"Cameroon (+237)",@"Canada (+1)",@"Cape Verde (+238)",@"Cayman Islands (+1 345)",@"Central African Republic (+236)",@"Chad (+235)",@" |
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
After I applied the latest Apple Security Update around October 20th 2012 my Java Applets would no longer work; | |
in particular the ATO Business Portal which I need to submit quarterly data to the Australian Taxation Office. | |
When using Safari I always got a "Missing Plugin" error - even after I "Enabled Java" in the Security Preferences of Safari. | |
I confirmed that my Java version was up to date by running: | |
java -version | |
which gave me: |
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
#!/bin/sh | |
# jpegoptim uses the unix-whereis gem which calls whereas | |
# with '-b' - Mac's whereis does not understand that | |
# so I fixed up whereis to ignore the '-b' parameter here | |
# by renaming the original 'whereis' to 'whereis.org' and | |
# installing this script in place of the original /usr/bin/whereis executable | |
# if you plan on using the jpegoptim ruby gem (which lead to this patch for me) | |
# you will also need to ensure that it is installed in a path that whereis looks in |