Skip to content

Instantly share code, notes, and snippets.

@paulgrav
paulgrav / kibana_azuread.md
Last active September 10, 2023 08:54
Setting up Azure AD OpenID Connect with Kibana

Enabled Azure AD with Kibana

1. Configure Elasticsearch

As a pre-requisite we need to register a new app in Azure AD, note down some properties, and generate a Client Secret.

  1. Register an app in Azure Active Directory.
  2. Note its Application (client) ID
  3. Note the Directory (tenant) ID
  4. Generate a New Client Secret.
  1. Login to the instance you want the access credentials for
  2. run curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
  3. Get the name of the role returned by this endpoint, and append it to the end: curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ROLE_NAME/
  4. The response will include the access key, security key and session token
@Integralist
Integralist / Ruby Lambdas.md
Last active August 8, 2023 05:10
Ruby lambdas

Lambda: standard

# Creating a lambda
l = lambda { |name| "Hi #{name}!" }

# Executing the lambda
l.call("foo") # => Hi foo!
@datagrok
datagrok / git-serve.md
Last active April 21, 2023 07:33
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
#!/usr/bin/env sh
cp ~/Library/Application\ Support/Google/Chrome/Default/History /tmp/chrome-history
sqlite3 /tmp/chrome-history "SELECT url FROM urls"
@sperelson
sperelson / ServeMixup.php
Created October 12, 2012 15:58
Mixup PHP curl routines with memcache
<?php
// Copyright Stephen Perelson
//
// Example PHP script to get a banner from http://mixup.hapnic.com
// Adds a 1 minute cache of the banner using Memcache
// Untested code
//
// Mixup is a cross-Promotion Linksharing service for Mxit web apps
class ServeMixup {
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jcleveley-zz
jcleveley-zz / 1-developer.md
Last active September 27, 2015 22:48
Job Requirements

Developer

Context

BBC News is one of the most popular sites in the UK and is trusted worldwide to deliver quality journalism across multiple devices.

Since the launch of the new responsive News site for Mobile, which redefined what's possible with Responsive Web Design, we are now focussed on rolling this approach out to tablet and desktop and across the 30 languages the BBC produces news in. You will be helping to deliver some of the only unbiased journalism available in some parts of the world.

We're based in the centre of London in Broadcasting House, a brand new building which provides a great working environment and houses the largest News Room in Europe. You will be working right next to journalists giving you direct feedback from users.

(function(a,b){function O(a){for(var b=0;b<J.bundles.length;b++)for(var c in J.bundles[b])if(c!=a&&v(J.bundles[b][c],a)>-1)return c}function N(){a.using=m,a.provide=n,a.define=o,a.loadrunner=p;return M}function L(a){var b,c;for(var d=0,e;e=J.matchers[d];d++){var f=e[0],g=e[1];if(b=a.match(f))return g(a)}throw new Error(a+" was not recognised by loader")}function K(a,b){var c=[];for(var d=0,e;e=a[d];d++)typeof e=="string"&&(e=L(e)),u(e)&&(e=new C(K(e,b),b)),c.push(e);return c}function J(){var a=t(arguments),b,c;typeof a[a.length-1]=="function"&&(b=a.pop()),typeof a[a.length-1]=="boolean"&&(c=a.pop());var d=new B(K(a,c),c);b&&d.then(b);return d}function I(){var a=t(arguments),b=[],c,d;typeof a[0]=="string"&&(c=a.shift()),u(a[0])&&(b=a.shift()),d=a.shift();return E(c,function(a){function f(){var e=H(t(b),c),f;typeof d=="function"?f=d.apply(c,e):f=d,typeof f=="undefined"&&(f=c.exports),a(f)}var c=this,e=[];for(var g=0,h=b.length;g<h;g++){var i=b[g];v(["require","exports"],i)==-1&&e.push(G(i,c))}e.length>0?J.apply
@mtigas
mtigas / gist:952344
Last active June 20, 2024 11:22
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: