Skip to content

Instantly share code, notes, and snippets.

@danquah
danquah / scaleway-azure-ad-oidc-setup.md
Created February 1, 2023 08:03
Setting up oidc-login for scaleway kapsule against azure ad

The following sets up an oidc flow using kubelogin aka oidc-login. Make sure to install the tool before continuing.

First set up a bunch of variables

# We're using an email claim, but it should be possible to get other claims to work
# See 
export AAD_USER_IDENTIFICATION=mads@reload.dk
{
"title": "4-delt",
"id": "01FMYMAYYC37J63ZRA3RQNVYT9",
"grid": {
"rows": 2,
"columns": 2
},
"regions": [
{
"id": "01G10FG3TK5FKSRAKD6ZH5EZS1",

Keybase proof

I hereby claim:

  • I am danquah on github.
  • I am danquah (https://keybase.io/danquah) on keybase.
  • I have a public key ASDZx5ZiXkEaApXL5JnkLs6G0Y8ZLz4jEO669PFOZds7SQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am danquah on github.
  • I am danquah (https://keybase.io/danquah) on keybase.
  • I have a public key whose fingerprint is F70E 6F13 F92D E16E 059C 3B79 76CB 0993 1EAB 189B

To claim this, I am signing this object:

@danquah
danquah / commerce_stock-check-for-product.patch
Created September 10, 2012 10:23
commerce_stock-check-for-product.patch
--- /tmp/commerce_stock.module 2012-09-10 11:34:24.000000000 +0200
+++ commerce_stock.module 2012-09-10 11:34:38.000000000 +0200
@@ -419,7 +419,7 @@ function commerce_stock_checkout_validat
$found_errors = FALSE;
// Check each line item
foreach ($order_wrapper->commerce_line_items as $index => $line_item_wrapper) {
- if(in_array($line_item_wrapper->type->value(), commerce_product_line_item_types())) {
+ if ($line_item_wrapper->getBundle() == 'product' && in_array($line_item_wrapper->type->value(), commerce_product_line_item_types())) {
$product_id = $line_item_wrapper->commerce_product->product_id->value();
$product = commerce_product_load($product_id);
@danquah
danquah / sl2012.vcl
Created July 18, 2012 11:57
sl2012 varnish config
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
backend sl2012_prod{
.host = "178.23.240.90";
.port = "80";
}
@danquah
danquah / tasks.php
Last active October 6, 2015 06:57
Remake tasks
<?php
#!/usr/bin/env drush
// add -dv to enable debugging
$drush_cmd = "drush";
// local alias
$self_record = drush_sitealias_get_record('@self');
$self_name = '@' . $self_record['#name'];