Skip to content

Instantly share code, notes, and snippets.

# Original author Mark Renoden (http://au.linkedin.com/in/markrenoden)
Get-AzureVM |
ForEach-Object {
$vm = $_.name;
Write-Output "$vm VM Properties";
Write-Output "---------------";
Format-List -InputObject $_ -Property *;
Write-Output "$vm VM Endpoints";
Write-Output "---------------" ;
@m-gagne
m-gagne / azure.rb
Last active August 29, 2015 13:57
Azure initialization for Ruby on Rails (using the Azure gem)
Azure.config.storage_account_name = "<your azure storage account name>"
Azure.config.storage_access_key = "<your azure storage access key>"
@m-gagne
m-gagne / install_postgresql.sh
Last active August 29, 2015 13:56
Install PostgreSQL for Ruby on Rails usage
sudo apt-get -y install postgresql postgresql-contrib libpq-dev
@m-gagne
m-gagne / rbenv-install.sh
Last active May 27, 2019 00:26 — forked from jnx/rbenv-install-system-wide.sh
Set's up local user rbenv with Ruby 2.0.0
# Update, upgrade and install development tools:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential git-core libssl-dev libsqlite3-dev curl nodejs nginx
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Add rbenv to the path:
echo 'export RBENV_ROOT=~/.rbenv' >> ~/.bash_profile
@m-gagne
m-gagne / example.js
Created September 11, 2013 02:52
Windows 8 HTML5/JavaScript code sample that asks for a review of the app after 5 launches per app version
// -------------------------------------------------------------------
// Ask for a review after 5 starts of a new version of the Application
// -------------------------------------------------------------------
// Variable to hold the number of time the app started
var startedCount = 0;
// Variable to hold if the user actually accepted to rate the application
var reviewedBefore = false;
// Variables to hold the current and the last version number that was started in a string
var currentPackage = Windows.ApplicationModel.Package;
@m-gagne
m-gagne / example.cs
Created September 11, 2013 02:50
Windows 8 C# code sample that asks for a review of the app after 5 launches per app version
// -------------------------------------------------------------------
// Ask for a review after 5 starts of a new version of the Application
// -------------------------------------------------------------------
// Variable to hold the number of time the app started
int startedCount = 0;
// Variable to hold if the user actually accepted to rate the application
bool reviewedBefore = false;
// Variables to hold the current and the last version number that was started in a string
string currentVersion = string.Format("{0} - {1} - {2} - {3}", Package.Current.Id.Version.Major,
@m-gagne
m-gagne / example.js
Created September 11, 2013 02:47
Windows 8 HTML5/Javascript code sample that asks for a review of the app after 5 launches
// Ask for a review after 5 starts of the Application
// Variable to hold the number of time the app started
var startedCount = 0;
// Check if the
variable was stored in the Roaming Settings before
var appData = Windows.Storage.ApplicationData.current;
var roamingSettings = appData.roamingSettings;
if (roamingSettings.values.hasKey("startedCount"))
{
@m-gagne
m-gagne / unity_example.cs
Created September 10, 2013 19:46
Windows 8 Unity C# code sample that asks for a review of the app after 5 launche
// Variable to hold the number of time the app started
var startedCount = 0;
// Check if the variable was stored in the Roaming Settings before
var appData = Windows.Storage.ApplicationData.current;
var roamingSettings = appData.roamingSettings;
if (roamingSettings.values.hasKey("startedCount"))
{
// If so, read it in the variable
startedCount = roamingSettings.values["startedCount"];
}
@m-gagne
m-gagne / example.cs
Last active December 22, 2015 18:39
Windows 8 C# code sample that asks for a review of the app after 5 launches
// --------------------------------------------------
// Ask for a review after 5 starts of the Application
// --------------------------------------------------
// Variable to hold the number of time the app started
int startedCount = 0;
// Check if the variable was stored in the Roaming Settings before
if (Windows.Storage.ApplicationData.Current.RoamingSettings.Values.ContainsKey("startedCount"))
{
// If so, read it in the variable
@m-gagne
m-gagne / 500px.json
Created November 22, 2012 01:34
500px Photos API JSON
{
"feature": "fresh_today",
"filters": {
"category": false,
"exclude": false
},
"current_page": 1,
"total_pages": 250,
"total_items": 5000,
"photos": [