Last tested using Mac OS X 10.8 Mountain Lion
- Backup .ssh folder to avoid having to regenerate codes for services such as Heroku and Github.
| #!/bin/bash | |
| # Creator: Phil Cook | |
| # Modified: Andy Miller | |
| osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
| osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
| osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) | |
| osx_patch_version=${osx_patch_version:-0} | |
| osx_version=$((${osx_major_version} * 10000 + ${osx_minor_version} * 100 + ${osx_patch_version})) | |
| brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') |
| (function( undefined ){ | |
| /* Apple Device Webkit Browsers */ | |
| var isIdevice = /(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent); | |
| if (isIdevice){ | |
| document.getElementsByTagName('body')[0].className += ' iphone ipod ipad'; | |
| } | |
| var isIphone = /(iPhone).*AppleWebKit/i.test(navigator.userAgent); | |
| if (isIphone){ | |
| document.getElementsByTagName('body')[0].className += ' iphone'; |
| // browser detect | |
| var BrowserDetect = { | |
| init: function() { | |
| this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; | |
| this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; | |
| this.OS = this.searchString(this.dataOS) || "an unknown OS"; | |
| }, | |
| searchString: function(data) { | |
| for (var i = 0; i < data.length; i++) { | |
| var dataString = data[i].string; |
| #!/bin/sh | |
| echo "What should the Application be called (no spaces allowed e.g. GCal)?" | |
| read inputline | |
| name=$inputline | |
| echo "What is the url (e.g. https://www.google.com/calendar/render)?" | |
| read inputline | |
| url=$inputline |
| using System; | |
| using Xamarin.Forms; | |
| namespace FormsGallery | |
| { | |
| public class WebViewDemoPage : ContentPage | |
| { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>chker</title> | |
| <link type="text/css" href="style.css" rel="stylesheet" /> | |
| </head> | |
| <body> | |
| <div id="chker" class="chker"> |
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |
| sudo sed -i "s/archive\.ubuntu/mirrors.digitalocean/g" /etc/apt/sources.list |