Skip to content

Instantly share code, notes, and snippets.

View cperryk's full-sized avatar

Chris Kirk cperryk

View GitHub Profile
@shawnbot
shawnbot / index.md
Last active August 23, 2023 10:18
Testing web pages with Xcode's iOS Simulator

Finding the Simulator

You can test with the iOS Simulator that comes with Xcode. Navigate to the Xcode app in the Finder, right click and select "Show Package Contents":

screen shot 2013-05-06 at 12 04 27 pm

Then navigate to Contents > Applications, and open the shortcut to "iPhone Simulator" (it may be called "iOS Simulator" depending on which version of Xcode you're running):

screen shot 2013-05-06 at 12 05 45 pm

@markmarkoh
markmarkoh / gist:2969317
Created June 21, 2012 23:55
World Map Geo JSON data
var countries_data = {"type":"FeatureCollection","features":[
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"},
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"},
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,3
@timoxley
timoxley / isPortTaken.js
Last active April 19, 2024 11:51
check if a port is being used with nodejs
var isPortTaken = function(port, fn) {
var net = require('net')
var tester = net.createServer()
.once('error', function (err) {
if (err.code != 'EADDRINUSE') return fn(err)
fn(null, true)
})
.once('listening', function() {
tester.once('close', function() { fn(null, false) })
.close()