This file contains hidden or 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
DO $$ | |
DECLARE | |
all_tables CURSOR FOR SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'; | |
BEGIN | |
FOR table_record IN all_tables LOOP | |
EXECUTE 'DROP TABLE ' || table_record.table_name || ' CASCADE'; | |
END LOOP; | |
END $$; |
This file contains hidden or 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
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.Tasks.dll" /> | |
<Target Name="AfterCompile" Condition="exists('app.$(Configuration).config')"> | |
<!-- Generate transformed app config in the intermediate directory --> | |
<TransformXml Source="app.config" Destination="$(IntermediateOutputPath)$(TargetFileName).config" Transform="app.$(Configuration).config" /> | |
<!-- Force build process to use the transformed configuration file from now on. --> | |
<ItemGroup> | |
<AppConfigWithTargetPath Remove="app.config" /> | |
<AppConfigWithTargetPath Include="$(IntermediateOutputPath)$(TargetFileName).config"> | |
<TargetPath>$(TargetFileName).config</TargetPath> | |
</AppConfigWithTargetPath> |
This file contains hidden or 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
void foobar(Type t) | |
{ | |
var listType = typeof(List<>); | |
var constructedListType = listType.MakeGenericType(t); | |
var instance = Activator.CreateInstance(constructedListType); | |
} |
This file contains hidden or 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 result = _repository.SystemGet(spec) | |
.GroupBy(g => g.SensorGuid, record => record, (guid, records) => records.OrderByDescending(r => r.Timestamp).FirstOrDefault()) | |
.ToList(); |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Cassandra; | |
using Cassandra.Data; | |
using Cassandra.Data.Linq; | |
using metrics.Core; | |
using metrics.Reporting; | |
using System.Diagnostics; |
This file contains hidden or 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
netsh interface portproxy add v4tov4 listenport=4422 listenaddress=192.168.1.111 connectport=80 connectaddress=192.168.0.33 |
This file contains hidden or 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
#!/bin/bash | |
# THESE ARE NOTES, NOT TESTED AS SCRIPT! | |
# We need the following to get and run teamcity agent | |
sudo apt-get install openjdk-7-jre-headless | |
sudo apt-get install unzip #For unzipping buildAgent.zip | |
# For compiling Simple.Web | |
sudo apt-get install ruby1.9.1 |
This file contains hidden or 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
# VirtualBox installer shell routines | |
# | |
# Copyright (C) 2007-2012 Oracle Corporation | |
# | |
# This file is part of VirtualBox Open Source Edition (OSE), as | |
# available from http://www.virtualbox.org. This file is free software; | |
# you can redistribute it and/or modify it under the terms of the GNU | |
# General Public License (GPL) as published by the Free Software | |
# Foundation, in version 2 as it comes in the "COPYING" file of the |
This file contains hidden or 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 Room | |
{ | |
public Guid Id { get; set; } | |
public string Title { get; set; } | |
public virtual User Manager { get; set; } | |
public virtual ICollection<User> Members { get; set; } | |
} |
This file contains hidden or 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; | |
namespace Sm.Exceptions | |
{ | |
public abstract class ArgumentExceptions : Exception | |
{ | |
protected ArgumentExceptions() { } | |
protected ArgumentExceptions(string message) : base(message) { } | |
} |
OlderNewer