- Install the latest JRE from Oracle
- In the Java Control Panel, go to the Security tab and make sure 'Enable Java Content' is checked
- Open Safari
- Go to the ATO Business portal site https://bp.ato.gov.au/BpStatics/homepage.htm
- Click Login
- A dialog will apear asking you 'Do you want to trust the website “authentication.business.gov.au” to use the “Java” plug-in?'
- Click 'Trust'
- Now you will be asked 'Do you want to run this application?'
- Click 'Run'
- Another dialog will appear asking you to 'Allow access to the following application from this website?'
NSVisualEffectMaterial constants, and the undocumented materials they coorespond to in various modes: | |
+----------------------+-------+----------+------+---------+ | |
| MATERIAL # | LIGHT | LIGHT EM | DARK | DARK EM | | |
+----------------------+-------+----------+------+---------+ | |
| | | | | | | |
| 0 - Appearance Based | 3 | 3 | 5 | 5 | | |
| | | | | | | |
| 1 - Light | 3 | 3 | 3 | 3 | | |
| | | | | | | |
| 2 - Dark | 4 | 4 | 4 | 4 | |
extension UIBezierPath { | |
class func getAxisAlignedArrowPoints(inout points: Array<CGPoint>, forLength: CGFloat, tailWidth: CGFloat, headWidth: CGFloat, headLength: CGFloat ) { | |
let tailLength = forLength - headLength | |
points.append(CGPointMake(0, tailWidth/2)) | |
points.append(CGPointMake(tailLength, tailWidth/2)) | |
points.append(CGPointMake(tailLength, headWidth/2)) | |
points.append(CGPointMake(forLength, 0)) | |
points.append(CGPointMake(tailLength, -headWidth/2)) |
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { | |
UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
// maybe show an action sheet with more options | |
[self.tableView setEditing:NO]; | |
}]; | |
moreAction.backgroundColor = [UIColor lightGrayColor]; | |
UITableViewRowAction *blurAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Blur" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
[self.tableView setEditing:NO]; | |
}]; |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
a: AM/PM | |
A: 0~86399999 (Millisecond of Day) | |
c/cc: 1~7 (Day of Week) | |
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat | |
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday | |
d: 1~31 (0 padded Day of Month) | |
D: 1~366 (0 padded Day of Year) | |
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
#!/usr/bin/env ruby | |
unless ARGV[0] | |
puts 'Usage: newpost "the post title"' | |
exit(-1) | |
end | |
date_prefix = Time.now.strftime("%Y-%m-%d") | |
postname = ARGV[0].strip.downcase.gsub(/ /, '-') | |
post = "/Users/al3x/src/al3x.github.com/_posts/#{date_prefix}-#{postname}.textile" |