Skip to content

Instantly share code, notes, and snippets.

View slattery's full-sized avatar

Mike Slattery slattery

View GitHub Profile
@kuchibs
kuchibs / OpenshiftOrigin.md
Last active September 11, 2019 09:11
Use Ansible to install Openshift Origin (oc) single node cluster on number of machines!

Install OpenShift Origin on one node (CENTOS) - commands:

1) Install docker

yum install docker -y 
systemctl start docker

Note:

echo "INSECURE_REGISTRY='--insecure-registry 172.30.0.0/16'" >> /etc/sysconfig/docker
systemctl enable docker
@russellpierce
russellpierce / athena.R
Created January 14, 2017 17:23
Connect to AWS Athena using R (with the option to use IAM credentials)
#repsych is on github and is here only for the glibrary idiom
library(repsych)
#install and load the following packages
glibrary(whisker, lubridate, magrittr, rappdirs, awsjavasdk, rJava)
if (!aws_sdk_present()) {
install_aws_sdk()
}
load_sdk()
@leonawicz
leonawicz / app.R
Last active March 14, 2021 06:27
Use custom local image files as icons in a Shiny Dashboard value box
#
# This Shiny web application demonstrates the use of custom image files
# in place of icons for value boxes in Shiny Dashboard by overriding two
# functions:
#
# 'icon' from the shiny package and 'valueBox' from the shinydashboard package.
#
# Each function adds minimal, specific additional handling of image files.
# Note: A custom css file must also be included so that value boxes can
# display the icons. For that reason, do not expect images in place of icons to
@kewang
kewang / git-merge-test.sh
Last active February 23, 2023 10:04
Git merge dry-run
#!/bin/sh
BRANCH=$1
git merge --no-commit --no-ff $1; git status; git merge --abort
# References: https://stackoverflow.com/questions/501407/is-there-a-git-merge-dry-run-option
@tzmartin
tzmartin / embedded-file-viewer.md
Last active April 3, 2025 11:05
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@maxvt
maxvt / infra-secret-management-overview.md
Last active February 3, 2025 06:11
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@micahstubbs
micahstubbs / .block
Last active November 10, 2018 23:22
Chatty Map II
license: MIT
border: none
height: 510
@nadav-dav
nadav-dav / dom2comp.js
Created March 15, 2016 10:37
React: Getting a component from a DOM element
let searchRoot = ReactDom.render(React.createElement(Main), document.getElementById('main'));
try {
var getComponent = (comp) => comp._renderedComponent ? getComponent(comp._renderedComponent) : comp;
var getComponentById = (id)=> {
var comp = searchRoot._reactInternalInstance;
var path = id.substr(1).split('.').map(a=> '.' + a);
if (comp._rootNodeID !== path.shift()) throw 'Unknown root';
while (path.length > 0) {
comp = getComponent(comp)._renderedChildren[path.shift()];
@lopspower
lopspower / README.md
Last active April 6, 2025 13:42
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@paullewis
paullewis / requestIdleCallback.js
Last active December 18, 2024 07:42
Shims rIC in case a browser doesn't support it.
/*!
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software