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 KeysJsonConverter : JsonConverter | |
{ | |
private readonly Type[] _types; | |
public KeysJsonConverter(params Type[] types) | |
{ | |
_types = types; | |
} | |
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) |
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 static void GetAttribute(Type t) | |
{ | |
DeveloperAttribute att; | |
// Get the class-level attributes. | |
// Put the instance of the attribute on the class level in the att object. | |
att = (DeveloperAttribute) Attribute.GetCustomAttribute (t, typeof (DeveloperAttribute)); | |
if (att == null) |
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
SELECT [t1].[column] FROM [MyTable] AS [t1] |
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
gci -inc bin,obj -rec | rm -rec -force |
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.IO; | |
using OfficeOpenXml; // (EPPLus - http://epplus.codeplex.com/) | |
namespace OfficeReports | |
{ | |
public static class DumpToExcel | |
{ | |
public static void Dump<T>(IEnumerable<T> data, string outputFilename) | |
{ |
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
#push direct to the command line. | |
Get-ChildItem -recurse | Select-String -pattern "dummy" | group path | select name | |
# a little more setup, but pushes out to a txt file | |
# Nice for searching for specific errors in a bunch of log files. | |
$logdir = "SOMEDIR" | |
$csvpath = "SOMEPATH" | |
gci $logdir -rec *.txt | gc | select-string $pattern | add-content $csvpath |
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
<?xml version="1.0"?> | |
<settings> | |
<console change_refresh="10" refresh="100" rows="25" columns="80" buffer_rows="500" buffer_columns="0" shell="" init_dir="" start_hidden="0" save_size="0"> | |
<colors background_text_opacity="255"> | |
<!-- ir_black --> | |
<color id="0" r="0" g="0" b="0"/> | |
<color id="1" r="150" g="203" b="254"/> | |
<color id="2" r="168" g="255" b="96"/> | |
<color id="3" r="198" g="197" b="254"/> | |
<color id="4" r="255" g="108" b="96"/> |
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
void Main() | |
{ | |
var databaseInfo = GetDatabaseInfo(this); | |
databaseInfo.Dump(); | |
} | |
// Define other methods and classes here | |
public class DatabaseInfo | |
{ | |
public Type DataContextType { get; set; } |
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
{% assign curDate = site.time | date: '%s' %} | |
{% for post in site.posts %} | |
{% assign postStartDate = post.date | date: '%s' %} | |
{% if postStartDate >= curDate %} | |
Post datas here | |
{% endif %} | |
{% endfor %} |
NewerOlder