Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using Unleash;
using Unleash.ClientFactory;
namespace hello_net
{
class Program
{
git clone --mirror URL
git remote add NEW-REMOTE URL
git push NEW-REMOTE --mirror

Keybase proof

I hereby claim:

  • I am ivarconr on github.
  • I am ico (https://keybase.io/ico) on keybase.
  • I have a public key ASAx2UwzNOrdLiVRycVjmWqPV_VWqHgXD9mTC9sYyRuH7go

To claim this, I am signing this object:

Checkout PR:
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally
@ivarconr
ivarconr / schema.patch
Created March 15, 2019 10:04
Fix validation
diff --git a/lib/routes/admin-api/feature-schema.js b/lib/routes/admin-api/feature-schema.js
index 262ccdc..8039aac 100644
--- a/lib/routes/admin-api/feature-schema.js
+++ b/lib/routes/admin-api/feature-schema.js
@@ -40,7 +40,11 @@ const featureShema = joi
.keys({
name: nameType,
enabled: joi.boolean().default(false),
- description: joi.string(),
+ description: joi
var unleashContext = {};
var fallbackVariant = {
enabled: false,
name: "disabled",
}
const varinat = getVariant('toggleName', unleashContext, fallbackVariant);
switch(variant.name) {
const async_hooks = require('async_hooks');
const fs = require('fs');
const http = require('http');
const fetch = require('node-fetch');
const asyncHook = async_hooks.createHook({
init: (asyncId, type, triggerAsyncId, resource) => {
if(type === 'TCPCONNECTWRAP') {
process.nextTick(() => {
console.log('TCPCONNECTWRAP');
const http = require('http');
const fetch = require('node-fetch');
const async_hooks = require('async_hooks');
const context = new Map();
const middleware = (req, res) => {
const id = async_hooks.executionAsyncId();
const headers = req.headers;
context.set(id, headers);
@ivarconr
ivarconr / podlet-xhr.js
Last active October 8, 2018 18:15
show-interest
const xhrBase = document.getElementById("showInterest").getAttribute('data-xhr-path');
const adId = document.getElementById("showInterest").getAttribute('data-ad-id');
fetch(`${xhrBase}save?adId=${adId}`).then(() => console.log('fetch'));
// Create and add EventListner
const func = ev => {console.log(ev.detail)};
const listner = window.addEventListener('demo', func);
// Publish custom event
const event = new CustomEvent('demo', {detail: 'hello world'});
window.dispatchEvent(event);
// Remove EventListner