Skip to content

Instantly share code, notes, and snippets.

View peter3's full-sized avatar

Peter Törnqvist peter3

View GitHub Profile
@peter3
peter3 / bootstrap-grid.css
Created June 22, 2020 15:23
Bootstraps grid layout replicated with CSS Grid
/* BOOTSTRAP GRID REPLICATED WITH CSS GRID */
/* https://hacks.mozilla.org/2017/04/replace-bootstrap-layouts-with-css-grid/ */
/* CONTAINER */
@supports(display:grid) {
.container {
margin-left: auto;
margin-right: auto;
padding-left: 15px;
padding-right: 15px;
@peter3
peter3 / Featurefolders.cs
Last active June 28, 2019 17:24 — forked from jbogard/Featurefolders.cs
Feature folders
public class FeatureViewLocationRazorViewEngine : RazorViewEngine
{
public FeatureViewLocationRazorViewEngine() {
var featureFolderViewLocationFormats = new[] {
"~/Features/{1}/{0}.cshtml",
"~/Features/Shared/Views/{0}.cshtml"
};
ViewLocationFormats = featureFolderViewLocationFormats;
MasterLocationFormats = featureFolderViewLocationFormats;
PartialViewLocationFormats = featureFolderViewLocationFormats;
@peter3
peter3 / git.migrate
Created March 6, 2018 07:57 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.