Skip to content

Instantly share code, notes, and snippets.

View jeff-french's full-sized avatar

Jeff French jeff-french

View GitHub Profile
grunt.initConfig({ 
  ripple: { 
    options: { 
      path: 'www', 
      keepAlive: true 
    }
  }
});
var gulp    = require('gulp');  
var replace = require('gulp-replace-task');  
var args    = require('yargs').argv;  
var fs      = require('fs');

gulp.task('replace', function () {  
  // Get the environment from the command line
  var env = args.env || 'localdev';
// localdev.json 
{
  "apiUrl":"https://dev.coolapp.com/api"
} 

// production.json 
{
  "apiUrl":"https://www.coolapp.com/api"
}
angular.module('coolapp', ['coolapp-constants'])
  .service('backendService', function($http, apiUrl){ 
    //Use the apiUrl variable to make API calls 
  });
angular.module('coolapp', ['coolapp-constants']);
@jeff-french
jeff-french / constants.js.md
Last active November 23, 2015 14:42
Environment Variables in AngularJS and Ionic - 1
angular.module('coolapp-constants',[])
  .constant('apiUrl', '@@apiUrl');
@jeff-french
jeff-french / profile.ps1
Created April 10, 2012 14:41
Add Git bin path to PowerShell session for Posh-Git
# Add Git bin directory to path for this session
$env:path += ";" + (Get-Item "Env:ProgramFiles(x86)").Value + "\Git\bin"
@jeff-french
jeff-french / .gitconfig
Last active October 1, 2015 10:57
My gitconfig file
[user]
name = Jeff French
email = jeff.french@moonswitch.com
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
[gc]
@jeff-french
jeff-french / gist:1506688
Created December 21, 2011 16:36
Remove reference from all projects in a solution using Package Manager Console
foreach ($proj in get-project -all) { $proj.Object.References | Where-Object {$_.Name -eq 'Enyim.Caching'} | ForEach-Object { $_.Remove()} }
@jeff-french
jeff-french / .gitignore
Created October 6, 2011 19:30
git ignore file for .NET projects
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc