-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
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
#!/bin/bash | |
while : | |
do | |
clear | |
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $* | |
sleep 1 | |
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
/** | |
* iBooks JS Framework | |
* Compatibility: iBooks 1.5+ | |
* Copyright © 2009-2011 Apple Inc. All rights reserved. | |
* | |
**/ | |
/** | |
* @name iBooks | |
* @namespace |
- You can store a price in a floating point variable.
- All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
- All currencies are subdivided in decimal units (like dinar/fils)
- All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
- All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
- Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
- For any currency you can have a price of 1. (ZWL)
- Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
I've been using the excellent VirtualHostX to set up my virtual hosts on OS X for a while now. It works great for setting up Apache virtual hosts and local domains.
A couple days ago, I decided to install OS X Server. When I enabled the web server portion, it seemingly disabled my virtual hosts and started showing its own page:
Apparently, there's no easy way to uninstall OS X Server.
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
/** | |
* Get a random floating point number between `min` and `max`. | |
* | |
* @param {number} min - min number | |
* @param {number} max - max number | |
* @return {number} a random floating point number | |
*/ | |
function getRandomFloat(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
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
@media screen and (device-aspect-ratio:1/1) { | |
/* anything in here will work on Fires. Seriously. */ | |
} | |
@media not all and (device-aspect-ratio:1/1) { | |
/* anything in here will work on e-inks */ | |
} |
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
// | |
// UICollectionViewFlowLayout+NoFade.m | |
// | |
// Created by Rob Booth on 3/4/14. | |
#import "UICollectionViewFlowLayout+NoFade.h" | |
#import <objc/runtime.h> | |
@implementation UICollectionViewFlowLayout (NoFade) |
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
package nettimeout | |
import ( | |
"net" | |
"time" | |
) | |
// Listener wraps a net.Listener, and gives a place to store the timeout | |
// parameters. On Accept, it will wrap the net.Conn with our own Conn for us. | |
type Listener struct { |
OlderNewer