Skip to content

Instantly share code, notes, and snippets.

View jkeam's full-sized avatar
🍻

Jon Keam jkeam

🍻
View GitHub Profile
@baldowl
baldowl / import.rb
Created January 8, 2012 16:41 — forked from juniorz/import.rb
Import a blogger archive to jekyll (octopress version)
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
@flemdizzle
flemdizzle / evaluation.js.jsx
Created February 5, 2017 16:56
Some JSX code to send to Jon
var Evaluation = React.createClass({
getInitialState: function() {
return {evaluation: this.props.evaluation};
},
updateData: function(form, data) {
var index = this.state.evaluation.indexOf(form);
var form_data = React.addons.update(this.state.evaluation[index].form,
{ $merge: data });
form.form = form_data;
@ghilead
ghilead / create_es_combined_index.rake
Last active January 18, 2019 12:08
Rake task for collocating multiple models as types in a single index.
# A Rake tasks to facilitate importing data from your models into a common Elasticsearch index.
#
# All models should declare a common index_name, and a document_type:
#
# class Article
# include Elasticsearch::Model
#
# index_name 'app_scoped_index'
# document_type 'articles'
#
@tonykhbo
tonykhbo / remote_crc.md
Last active June 19, 2020 03:01 — forked from tmckayus/remote_crc.md
Running 'crc' on a remote server

Overview: running crc on a remote server

This original document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The original gist by Roberto ha

@dudash
dudash / kn-select
Last active April 13, 2021 20:46
Flip between versions of the Knative CLI easily
#!/bin/bash
# Simple script to help configuring which kn CLI to use when you
# have a need to keep multiple versions and switch between them.
# Install and notes:
# 1. put this in /usr/local/bin and chmod +x
# 2. keep all the versions of kn in the /Applications directory
# 3. name kn executables with corresponding version - e.g. /Applications/kn-0.14.0
@chrishannah
chrishannah / iOS Icon Sizes.md
Last active February 15, 2022 23:43
A list containing all the icon names and sizes for iOS and watchOS.

iOS 12 Icon Sizes

(Taken from Xcode 10)

iPhone

iPhone Notification (iOS 7-12) 20pt

  • 2x - 40px
  • 3x - 60px
@pat
pat / thinking_sphinx.yml
Last active April 23, 2022 03:49
Thinking Sphinx Configuration
# Extended configuration for Thinking Sphinx can be stored in the
# config/thinking_sphinx.yml file within your application (this file was
# previously known as config/sphinx.yml in TS v1/v2).
#
# Many settings from Sphinx itself can be set here, and they'll flow through to
# the appropriate section of the generated configuration. However, some are
# used for Thinking Sphinx behaviour, and so those are documented here first.
#
# Configuration is grouped by environment, just like config/database.yml in a
# standard Rails application.
@jordansissel
jordansissel / Procfile
Created April 5, 2012 19:29
Jenkins on Heroku
# Only listen on http; disable ajp and https
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1
#!/usr/bin/env bash
# Original Source: http://blog.nonuby.com/blog/2012/07/05/copying-env-vars-from-one-heroku-app-to-another/
## Usage: heroku_env_copy [options] SOURCE TARGET
##
## NOTE: This script will only output the command, you should run it yourself.
##
## Options:
## -h, --help Display this message.
##
# Get odo for linux
$ curl -OL https://mirror.openshift.com/pub/openshift-v4/clients/odo/v2.0.0/odo-linux-amd64 && mv odo-linux-amd64 odo && chmod u+x odo
$ export PATH=$PATH:$(pwd)
$ odo version
# Use git to check out the .NET Core application
$ git clone https://github.com/redhat-developer/s2i-dotnetcore-ex
$ cd s2i-dotnetcore-ex/app
$ git checkout dotnetcore-3.1