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
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes

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:

@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));
@jeff-french
jeff-french / Gruntfile.js
Created November 20, 2013 23:18
PhoneGap development with Grunt Ripple and a browser
grunt.registerTask('server', 'minify','and-all-that','cool-stuff', 'ripple');
@jeff-french
jeff-french / Gruntfile.js
Last active December 26, 2015 01:39
PhoneGap development with Ripple and Grunt
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
express: {
all: {
options: {
port: 9000,
hostname: '0.0.0.0',
@jeff-french
jeff-french / ICacheClientExtensions.cs
Created April 11, 2013 16:19
Extension method for ServiceStack ICacheClient that fetches an item from the cache or adds it if it is not there.
public static T GetOrAdd<T>(this ICacheClient cache, string key, DateTime expiresAt, Func<T> getItemToCacheDelegate)
{
T item;
var itemIsInCache = !cache.Add(key, "", expiresAt);
if (itemIsInCache)
{
item = cache.Get<T>(key);
}
else
@jeff-french
jeff-french / pc.config
Created January 2, 2013 02:56
Chocolatey config file for setting up a fresh PC.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VisualStudio2012Ultimate" />
<package id="resharper" />
<package id="MsSqlServer2012Express" />
<package id="dropbox" />
<package id="7zip" />
<package id="console2" />
<package id="nodejs.install" />
<package id="sublimetext2.app" />