Skip to content

Instantly share code, notes, and snippets.

View miseeger's full-sized avatar
💭
continuously learning ...

Michael Seeger miseeger

💭
continuously learning ...
View GitHub Profile
@miseeger
miseeger / CrossOriginSupportModule.cs
Created May 16, 2019 05:21 — forked from mmorton/CrossOriginSupportModule.cs
An IHttpModule for Enabling CORS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Sample
{
public class CrossOriginRequestInfo
{
public string Origin { get; set; }
@miseeger
miseeger / stringify.js
Created February 7, 2019 14:20 — forked from cowboy/stringify.js
JavaScript: like JSON.stringify but handles functions, good for creating arbitrary .js objects?
var stringify = function(obj, prop) {
var placeholder = '____PLACEHOLDER____';
var fns = [];
var json = JSON.stringify(obj, function(key, value) {
if (typeof value === 'function') {
fns.push(value);
return placeholder;
}
return value;
}, 2);
@miseeger
miseeger / composer.json
Created May 31, 2018 17:22 — forked from mfurlend/composer.json
composer require git repository
{
"name": "my_vendor_name/my_package",
"description": "My Package Description",
"license": "GPL-3.0",
"autoload": {
"classmap": [ // search these directories for classes
"lib/"
]
},
"repositories": {
@miseeger
miseeger / Multiselect2Field.vue
Created April 10, 2018 19:33 — forked from SebastienTainon/Multiselect2Field.vue
Vue-form-generator multiselect field with asynchronous behaviour. You have to return a promise in the search query
<template>
<multiselect
:id="selectOptions.id"
:options="options"
:value="value"
:multiple="selectOptions.multiple"
:track-by="selectOptions.trackBy || null"
:label="selectOptions.label || null"
:searchable="selectOptions.searchable"
:clear-on-select="selectOptions.clearOnSelect"
@miseeger
miseeger / xdebug.php.ini
Created January 14, 2018 13:13
XDebug config php.ini
; Add this at the end of your php.ini to activate XDebug.
; Be sure to put in the correct directories and php_xdebug
; version!
zend_extension = "C:\XAMPP\php\ext\php_xdebug-2.5.5-7.1-vc14.dll"
[XDebug]
; xdebug.auto_trace
@miseeger
miseeger / Startup.cs
Created December 12, 2017 19:17 — forked from xivk/Startup.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Nancy.Owin;
using Microsoft.Extensions.Configuration;
using Microsoft.AspNetCore.Mvc;
using Nancy;
using Nancy.Security;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Anyways.Nancy.API
{
@miseeger
miseeger / ESLintForVueFilesInVSCode.txt
Created October 13, 2017 19:32
ESLint for .vue files in VS Code
1) Install ESLint for VS Code (https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
2) Add the following settings to VS Code settings:
"[javascript]": {
"editor.tabSize": 4,
"editor.insertSpaces": true
},
"[vue]": {
"editor.tabSize": 4,
"editor.insertSpaces": true
@miseeger
miseeger / I18izedVueFormGenerator.vue
Last active October 11, 2017 19:55
German validator messages for Vue Form Generator
<template>
<div>
<!-- template here ... -->
</div>
</template>
<script>
import VueFormGenerator from "vue-form-generator";
import setValidatorsMessages from "./vfg-german.js";
import "vue-form-generator/dist/vfg.css";
@miseeger
miseeger / NancyFxExtension.cs
Created August 29, 2017 07:17
NancyFX 2 Extension Methods
using System.Collections.Generic;
namespace MyNancyfx.Extensions
{
public static class NancyFxExtensions
{
public static IDictionary<string, object> GetOwinEnvironment(this Nancy.NancyContext context)
{