Skip to content

Instantly share code, notes, and snippets.

View jeff-french's full-sized avatar

Jeff French jeff-french

View GitHub Profile
@jeff-french
jeff-french / pod.yaml
Created January 23, 2023 20:02
Pod Example
apiVersion: v1
kind: Pod
metadata:
name: configmap-demo-pod
spec:
containers:
- name: demo
image: alpine
command: ["sleep", "3600"]
env:
@jeff-french
jeff-french / configmap.yaml
Last active January 23, 2023 20:01
ConfigMap Examples
apiVersion: v1
kind: ConfigMap
metadata:
name: game-demo
data:
# property-like keys; each key maps to a simple value
player_initial_lives: "3"
ui_properties_file_name: "user-interface.properties"
# file-like keys
@jeff-french
jeff-french / README.md
Last active January 10, 2018 18:08
Update all outdated npm packages

To update all packages that are returned by the npm outdated command to their latest version:

$ npm outdated | tail -n +2 | tr -s ' ' | cut -d ' ' -f1 | xargs -I {} npm up {}

Explaination

npm outdated: Lists all packages installed that are not at their latest version.

@jeff-french
jeff-french / build-spec.js
Created April 14, 2017 21:23
Swagger with merges
var resolve = require('json-refs').resolveRefs;
var YAML = require('yaml-js');
var fs = require('fs');
var root = YAML.load(fs.readFileSync('index.yml').toString());
var options = {
filter : ['relative', 'remote'],
loaderOptions : {
processContent : function (res, callback) {
callback(null, YAML.load(res.text));

Keybase proof

I hereby claim:

  • I am jeff-french on github.
  • I am jfrench (https://keybase.io/jfrench) on keybase.
  • I have a public key ASDeIDr2W-uhvt6FtfYkhKZ4o4TXhgwOfrIU0Usfal6-oQo

To claim this, I am signing this object:

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']);