Skip to content

Instantly share code, notes, and snippets.

@kid
kid / test
Created April 18, 2018 14:29
test-versionned-jobbs
public interface IStringParameter {
public int Id { get; }
public string Key { get; }
}
public abstract class StringParameter : IStringParameter
{
public abstract int Id { get; }
public abstract string Key { get; }
public abstract string Description { get; }
@kid
kid / v2
Created June 13, 2017 08:21
nginx...
if ($cors = "simple") {
set $my_allow_origins "$http_origin";
}
if ($cors = "preflight") {
set $my_allow_origins "$http_origin";
set $my_allow_methods "GET, HEAD, POST, OPTIONS";
set $my_allow_headers "Cache-Control";
}
location / {
expires $expires;
if ($cors = "simple") {
add_header "Access-Control-Allow-Origin" "$http_origin";
}
if ($cors = "preflight") {
add_header "Access-Control-Allow-Origin" "$http_origin";
add_header "Access-Control-Allow-Methods" "GET, HEAD, POST, OPTIONS";
[Unit]
Description=Let's Encrypt renewal service
Documentation=https://certbot.eff.org/#arch-other
After=network.target
[Service]
ExecStart=/usr/bin/certbot renew --renew-hook "systemctl reload vault.service"
Type=oneshot
#!ipxe
set base-url http://stable.release.core-os.net/amd64-usr/current
kernel ${base-url}/coreos_production_pxe.vmlinuz coreos.config.url=https://example.com/pxe-config.ign
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAKH7u/iMQkBjs5QT6LyVv1JttIxrgrxEMwdbZjNcnEgHrixLh4vZMJTOE8F/mHzKeOu7mi5jjxY5bjJ9L0rxf4Watl0E4TBrha+FIBDvQsA+eDPNF0PhApIZYjQwzSo3bkA39d1i92ayARSPMBZkKL5KZyeMzHS9h3lI1cXz7/lOSD2aVdxvz2qW+YpggKWHJG5UMfH5bktfroMGG/yS1T6Cif6q1wuvYFyRTWP2TpwbGmKOpgbUCpi0HAzYk0B78XO48FbG7/eruPyAITGtM4tUqL+yKcgSwdvDLzikUnd872DbKXa+5gatQjSBU45m/3yMJTaQbZpUlRnC7nwFJ [email protected]

Keybase proof

I hereby claim:

  • I am kid on github.
  • I am arnaudrebts (https://keybase.io/arnaudrebts) on keybase.
  • I have a public key ASCUQx7rbVCRbhvvKh1ipi4i9z4tHhA8JD7W09TW8I_5nAo

To claim this, I am signing this object:

import request from 'request'
import SparqlHttp from 'sparql-http-client'
const endpointUrl = process.env.MU_SPARQL_ENDPOINT !== undefined
? process.env.MU_SPARQL_ENDPOINT
: 'http://database:8890/sparql'
function call(ctx, fn, query options) {
return new Promise((resolve, reject) => {
const requestCallback = (err, res) => {
import Hapi from 'hapi'
const routeWithErrorInPromise = {
method: 'GET',
path: '/foo',
handler: (request, reply) => {
return reply(Promise.resolve('foo').then(() => { throw new Error('foo') }))
}
}