This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MySettings | |
{ | |
public string Value1 { get; set; } | |
public string Value2 { get; set; } | |
} | |
public class Startup | |
{ | |
public void ConfigureService(IServiceCollection services) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using Xunit; | |
using FluentAssertions; | |
using FakeItEasy; | |
namespace HipHopFlow | |
{ | |
public class FlowService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import { connect } from 'react-redux'; | |
import { fetchListing } from '../../actions/ListingActions'; | |
@connect((store) => { | |
return { | |
listing: store.listing.listing, | |
}; | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'date' | |
class Girl | |
def initialize(name, date_of_birth, weight_in_kg) | |
@name = name | |
@date_of_birth = date_of_birth | |
@weight_in_kg = weight_in_kg | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.Database.ExecuteSqlCommand("sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'"); | |
context.Database.ExecuteSqlCommand("sp_MSForEachTable 'IF OBJECT_ID(''?'') NOT IN (ISNULL(OBJECT_ID(''[dbo].[__MigrationHistory]''),0)) DELETE FROM ?'"); | |
context.Database.ExecuteSqlCommand("EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL'"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install --save-dev gulp gulp-babel babelify through2 gulp-rename gulp-load-plugins | |
var gulp = require('gulp'); | |
var $ = require('gulp-load-plugins')(); | |
var browserify = require('browserify'); | |
var through2 = require('through2'); | |
var babelify = require('babelify'); | |
var srcApp = './src/app.js'; | |
var srcWatchPath = './src/**/*.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove osxfuse if installed via homebrew: | |
> brew uninstall osxfuse | |
Install osxfuse binary and choose to install the MacFUSE compatibility layer: | |
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files | |
Reboot (optional but recommended by osxfuse) | |
Install ntfs-3g via homebrew: | |
> brew update && brew install ntfs-3g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var $ = require('gulp-load-plugins')(); | |
gulp.task('default', ['watchJs', 'watchTests']); | |
// make sure you do not start a path with ./ | |
// there's some bug in gaze that causes globs with ./ to not fire | |
var unitTestPaths = [ | |
'tests/**/*_tests.js' | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -L 18080:localhost:8080 user@server | |
# ssh -L [localport]:localhost:[remoteport] user@server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using(var context = new PlayContext()) | |
{ | |
context.Database.ExecuteSqlCommand(@" | |
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'; | |
EXEC sp_MSForEachTable 'IF OBJECT_ID(''?'') NOT IN (OBJECT_ID(''[dbo].[__MigrationHistory]'')) DELETE FROM ?'; | |
EXEC sp_MSForEachTable 'ALTER TABLE ? WITH CHECK CHECK CONSTRAINT ALL'; | |
"); | |
} |
NewerOlder