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
$$("form#removeDevice tbody tr").each(function(row) { | |
var nameSpan = $(row).select("td.name span")[0]; | |
var name = (nameSpan["title"] != "") ? nameSpan["title"] : nameSpan.innerHTML; | |
var udid = $(row).select("td.id")[0]["title"]; | |
console.log(udid + "," + name); | |
}); |
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
echo "Creating new motion JPEG..." | |
echo > timelapse.mjpeg | |
echo "Concatenating JPEG stream..." | |
for i in $( find /path/to/your/jpegs -type f -name '*.jpg' | sort ); do | |
cat $i >> timelapse.mjpeg | |
done | |
echo "Running first FFMPEG pass..." | |
ffmpeg -y -i timelapse.mjpeg -an \ |
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
class Integer | |
def prime? | |
!("1" * self).match(/^1?$|^(11+?)\1+$/).nil? | |
end | |
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
http://www.ga.gov.au/meta/ANZCW0703011435.xml | |
http://www.ga.gov.au/meta/ANZCW0703009510.xml | |
http://www.ga.gov.au/meta/ANZCW0703011436.xml | |
http://www.ga.gov.au/meta/ANZCW0703009790.xml | |
http://www.ga.gov.au/meta/ANZCW0703011455.xml | |
http://www.ga.gov.au/meta/ANZCW0703011456.xml | |
http://www.ga.gov.au/meta/ANZCW0703012215.xml |
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
// prototype | |
new Ajax.Request("/your/mom", onSuccess: function(response) { $("lightbox_content").innerHTML = response.responseJSON.contents }) | |
// jquery | |
$.getJSON("/your/mom", function(json) { $("#lightbox_content").html(json.contents) }) | |
// $.getJSON provides no ability to handle connection/parse errors | |
$.ajax({ url: "/your/mom", success: function(json) { $("#lightbox_content").html(json.contents) }, dataType: "json" }) |
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
- (NSString*)stringWithDeviceToken:(NSData*)deviceToken { | |
const char* data = [deviceToken bytes]; | |
NSMutableString* token = [NSMutableString string]; | |
for (int i = 0; i < [deviceToken length]; i++) { | |
[token appendFormat:@"%02.2hhX", data[i]]; | |
} | |
return [[token copy] autorelease]; | |
} |
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
.pk-scroll-view | |
{ | |
width:100%; | |
height:100%; | |
overflow:hidden; | |
margin:0; | |
padding:0; | |
} | |
.pk-scroll-view>.hosting-layer |
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
pattern = begin | |
delimeter = "[-/.]+" | |
century_prefix = "(?:19|20)" | |
under_ten = "(?:0[1-9]+)" | |
ten_to_twelve = "(?:1[012]+)" | |
ten_and_under_thirty = "(?:[12]+[0-9]+)" | |
thirties = "(?:3[01]+)" | |
year = "(#{century_prefix}[0-9]{2})" |
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
Check altitude... | |
http://ws.geonames.org/gtopo30JSON?lat=-33.92541457768646&lng=151.11934661865234&callback=loadJSON |
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
# define ALog(format, ...) NSLog((@"%s [L%d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
# ifdef DEBUG | |
# define DLog(format, ...) ALog(format, ##__VA_ARGS__); | |
# else | |
# define DLog(...) | |
# endif |