Skip to content

Instantly share code, notes, and snippets.

@mwbrooks
mwbrooks / index.html
Created October 3, 2010 21:23
PhoneGap-Console
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
<title>PhoneGap Console</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript">
/**
* Lucida Grande doesn't have italics, but is preferable for its small size awesomeness.
* Lucida Sans has lovely italics.
* Let's use @font-face to combine them
*/
body {
font-family:'Lucida Improved','Lucida Grande','Lucida Sans','Lucida Sans Unicode',Verdana,sans-serif;
}
@font-face {
font-family:'Lucida Improved';
/*
The MIT License
Copyright (c) 2010 Jesse MacFadyen, Nitobi Software
[email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
@marijn
marijn / README.markdown
Last active September 13, 2024 19:00
List of countries in YAML, CSV and TXT format
@eligrey
eligrey / object-watch.js
Created April 30, 2010 01:38
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@mwbrooks
mwbrooks / PhoneGapDelegate.m
Created April 22, 2010 07:26
PhoneGap-iPhone Viewport Issue
//
// A quick and dirty fix to issue #51
//
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
CGRect windowFrame = [ [ UIScreen mainScreen ] bounds ];
CGRect webViewFrame = [ [ UIScreen mainScreen ] applicationFrame ];
webViewFrame.origin = windowFrame.origin;
self.window = [ [ [ UIWindow alloc ] initWithFrame:windowFrame ] autorelease ];
# Are you using the BASH shell?
echo $SHELL # /bin/bash
#
# Day-to-day shortcuts for the BASH shell
# ---------------------------------------
#
# up/down arrows => View your command history
#
# tab => Auto-complete file and directory names from ...
typeof NaN === 'number' // true
Infinity === 1/0 // true
0.1 + 0.2 === 0.3 // false